[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL v2 10/43] hw/mips/gt64xxx_pci: Convert gt64120_reset()
From: |
Eduardo Habkost |
Subject: |
[Qemu-ppc] [PULL v2 10/43] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method |
Date: |
Thu, 25 Oct 2018 10:32:28 -0300 |
From: Philippe Mathieu-Daudé <address@hidden>
Convert the gt64120_reset() function into a proper Device reset method.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/mips/gt64xxx_pci.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index 24ad0ad024..dcd1a66329 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -992,9 +992,9 @@ static void gt64120_pci_set_irq(void *opaque, int irq_num,
int level)
}
-static void gt64120_reset(void *opaque)
+static void gt64120_reset(DeviceState *dev)
{
- GT64120State *s = opaque;
+ GT64120State *s = GT64120_PCI_HOST_BRIDGE(dev);
/* FIXME: Malta specific hw assumptions ahead */
@@ -1184,16 +1184,6 @@ PCIBus *gt64120_register(qemu_irq *pic)
return phb->bus;
}
-static int gt64120_init(SysBusDevice *dev)
-{
- GT64120State *s;
-
- s = GT64120_PCI_HOST_BRIDGE(dev);
-
- qemu_register_reset(gt64120_reset, s);
- return 0;
-}
-
static void gt64120_pci_realize(PCIDevice *d, Error **errp)
{
/* FIXME: Malta specific hw assumptions ahead */
@@ -1241,9 +1231,8 @@ static const TypeInfo gt64120_pci_info = {
static void gt64120_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
- sdc->init = gt64120_init;
+ dc->reset = gt64120_reset;
dc->vmsd = &vmstate_gt64120;
}
--
2.18.0.rc1.1.g3f1ff2140
- Re: [Qemu-ppc] [PULL v2 05/43] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events, (continued)
[Qemu-ppc] [PULL v2 06/43] hw/timer/sun4v-rtc: Use DeviceState::realize rather than SysBusDevice::init, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 04/43] trace-events: Fix copy/paste typo, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 03/43] vl:c: make sure that sockets are calculated correctly in '-smp X' case, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 02/43] vl.c deprecate incorrect CPUs topology, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 01/43] hostmem-file: fixed the memory leak while get pmem path., Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 20/43] pc-dimm: pass PCDIMMDevice to pc_dimm_.*plug, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 17/43] memory-device: fix alignment error message, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 13/43] hw/alpha/typhoon: Remove unuseful code, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 10/43] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method,
Eduardo Habkost <=
[Qemu-ppc] [PULL v2 19/43] memory-device: improve "range conflicts" error message, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 14/43] hw/hppa/dino: Remove unuseful code, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 15/43] hw/mips/malta: Remove unuseful code, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 12/43] hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device', Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 18/43] memory-device: fix error message when hinted address is too small, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 22/43] memory-device: introduce separate config option, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 21/43] memory-device: use memory device terminology in error messages, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 23/43] memory-device: forward errors in get_region_size()/get_plugged_size(), Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 16/43] machine: fix a typo, Eduardo Habkost, 2018/10/25
[Qemu-ppc] [PULL v2 24/43] memory-device: document MemoryDeviceClass, Eduardo Habkost, 2018/10/25