[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 43/67] hw/ppc: QOM'ify e500.c
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 43/67] hw/ppc: QOM'ify e500.c |
Date: |
Thu, 12 Jan 2017 13:03:03 +1100 |
From: xiaoqiang zhao <address@hidden>
Drop the old SysBus init function and use instance_init
Signed-off-by: xiaoqiang zhao <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/e500.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index cf8b122..792bd79 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -1049,27 +1049,18 @@ void ppce500_init(MachineState *machine, PPCE500Params
*params)
boot_info->dt_size = dt_size;
}
-static int e500_ccsr_initfn(SysBusDevice *dev)
+static void e500_ccsr_initfn(Object *obj)
{
- PPCE500CCSRState *ccsr;
-
- ccsr = CCSR(dev);
- memory_region_init(&ccsr->ccsr_space, OBJECT(ccsr), "e500-ccsr",
+ PPCE500CCSRState *ccsr = CCSR(obj);
+ memory_region_init(&ccsr->ccsr_space, obj, "e500-ccsr",
MPC8544_CCSRBAR_SIZE);
- return 0;
-}
-
-static void e500_ccsr_class_init(ObjectClass *klass, void *data)
-{
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = e500_ccsr_initfn;
}
static const TypeInfo e500_ccsr_info = {
.name = TYPE_CCSR,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(PPCE500CCSRState),
- .class_init = e500_ccsr_class_init,
+ .instance_init = e500_ccsr_initfn,
};
static void e500_register_types(void)
--
2.9.3
- [Qemu-devel] [PULL 57/67] target-ppc: Add xsxexpqp instruction, (continued)
- [Qemu-devel] [PULL 57/67] target-ppc: Add xsxexpqp instruction, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 62/67] ppc: Add ppc_set_compat_all(), David Gibson, 2017/01/11
- [Qemu-devel] [PULL 41/67] qtest: add ivshmem-test for ppc64, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 58/67] target-ppc: Add xsxsigdp instruction, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 59/67] target-ppc: Add xsxsigqp instructions, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 46/67] target-ppc: Add xxextractuw instruction, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 17/67] ppc: Clean up and QOMify hypercall emulation, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 35/67] ppc: Rewrite ppc_get_compat_smt_threads(), David Gibson, 2017/01/11
- [Qemu-devel] [PULL 39/67] libqos: fix spapr qpci_map(), David Gibson, 2017/01/11
- [Qemu-devel] [PULL 44/67] hw/ppc: QOM'ify ppce500_spin.c, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 43/67] hw/ppc: QOM'ify e500.c,
David Gibson <=
- [Qemu-devel] [PULL 67/67] ppc: Fix a warning in bcdcfz code and improve BCD_DIG_BYTE macro, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 50/67] prep: add IBM RS/6000 7020 (40p) machine emulation, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 65/67] target-ppc: Add xscvqpdp instruction, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 52/67] target-ppc: Replace isden by float64_is_zero_or_denormal, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 48/67] prep: add PReP System I/O, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 66/67] ppc: Prevent inifnite loop in decrementer auto-reload., David Gibson, 2017/01/11
- [Qemu-devel] [PULL 53/67] target-ppc: Rename helper_compute_fprf to helper_compute_fprf_float64, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 55/67] target-ppc: Use correct precision for FPRF setting, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 63/67] target-ppc: Add xsaddqp instructions, David Gibson, 2017/01/11
- [Qemu-devel] [PULL 54/67] target-ppc: Add xscvdphp, xscvhpdp, David Gibson, 2017/01/11