[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset |
Date: |
Thu, 26 Sep 2019 17:17:31 +0200 |
Convert the reset handler into a proper Device reset method.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/pci-host/bonito.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index ceee463a11..aaba96bd13 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -45,7 +45,6 @@
#include "hw/mips/mips.h"
#include "hw/pci/pci_host.h"
#include "migration/vmstate.h"
-#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "exec/address-spaces.h"
@@ -570,9 +569,9 @@ static int pci_bonito_map_irq(PCIDevice * pci_dev, int
irq_num)
}
}
-static void bonito_reset(void *opaque)
+static void bonito_reset(DeviceState *dev)
{
- PCIBonitoState *s = opaque;
+ PCIBonitoState *s = PCI_BONITO(dev);
/* set the default value of north bridge registers */
@@ -671,8 +670,6 @@ static void bonito_realize(PCIDevice *dev, Error **errp)
pci_set_byte(dev->config + PCI_INTERRUPT_PIN, 0x01);
pci_set_byte(dev->config + PCI_MIN_GNT, 0x3c);
pci_set_byte(dev->config + PCI_MAX_LAT, 0x00);
-
- qemu_register_reset(bonito_reset, s);
}
PCIBus *bonito_init(qemu_irq *pic)
@@ -703,6 +700,7 @@ static void bonito_class_init(ObjectClass *klass, void
*data)
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+ dc->reset = bonito_reset;
k->realize = bonito_realize;
k->vendor_id = 0xdf53;
k->device_id = 0x00d5;
--
2.20.1
- [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 01/11] hw/acpi/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 03/11] hw/isa/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 05/11] hw/ide/sii3112: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 07/11] hw/isa/vt82c686: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 06/11] hw/ide/via82c: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset,
Philippe Mathieu-Daudé <=
- [PATCH 08/11] hw/input/lm832x: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- Re: [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, no-reply, 2019/09/27