[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 106/173] arm_l2x0: QOM cast cleanup
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 106/173] arm_l2x0: QOM cast cleanup |
Date: |
Mon, 29 Jul 2013 21:19:23 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/misc/arm_l2x0.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
index f3ce477..8e192cd 100644
--- a/hw/misc/arm_l2x0.c
+++ b/hw/misc/arm_l2x0.c
@@ -23,8 +23,12 @@
/* L2C-310 r3p2 */
#define CACHE_ID 0x410000c8
+#define TYPE_ARM_L2X0 "l2x0"
+#define ARM_L2X0(obj) OBJECT_CHECK(L2x0State, (obj), TYPE_ARM_L2X0)
+
typedef struct L2x0State {
- SysBusDevice busdev;
+ SysBusDevice parent_obj;
+
MemoryRegion iomem;
uint32_t cache_type;
uint32_t ctrl;
@@ -137,7 +141,7 @@ static void l2x0_priv_write(void *opaque, hwaddr offset,
static void l2x0_priv_reset(DeviceState *dev)
{
- L2x0State *s = DO_UPCAST(L2x0State, busdev.qdev, dev);
+ L2x0State *s = ARM_L2X0(dev);
s->ctrl = 0;
s->aux_ctrl = 0x02020000;
@@ -155,7 +159,7 @@ static const MemoryRegionOps l2x0_mem_ops = {
static int l2x0_priv_init(SysBusDevice *dev)
{
- L2x0State *s = FROM_SYSBUS(L2x0State, dev);
+ L2x0State *s = ARM_L2X0(dev);
memory_region_init_io(&s->iomem, OBJECT(dev), &l2x0_mem_ops, s,
"l2x0_cc", 0x1000);
@@ -181,7 +185,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo l2x0_info = {
- .name = "l2x0",
+ .name = TYPE_ARM_L2X0,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(L2x0State),
.class_init = l2x0_class_init,
--
1.8.1.4
- [Qemu-devel] [PULL 090/173] pl050: QOM'ify pl050_keyboard and pl050_mouse, (continued)
- [Qemu-devel] [PULL 090/173] pl050: QOM'ify pl050_keyboard and pl050_mouse, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 091/173] arm_gic: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 089/173] pl050: Rename pl050_state to PL050State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 092/173] etraxfs_pic: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 093/173] exynos4210_combiner: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 096/173] grlib_irqmp: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 094/173] exynos4210_gic: QOM cast cleanup for exynos4210.gic, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 095/173] exynos4210_gic: QOM cast cleanup for exynos4210.irq_gate, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 097/173] lm32_pic: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 105/173] arm_l2x0: Rename l2x0_state to L2x0State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 106/173] arm_l2x0: QOM cast cleanup,
Andreas Färber <=
- [Qemu-devel] [PULL 107/173] arm_sysctl: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 108/173] eccmemctl: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 109/173] exynos4210_pmu: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 110/173] lm32_sys: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 112/173] milkymist-pfpu: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 111/173] milkymist-hpdmc: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 116/173] slavio_misc: QOM cast cleanup for APCState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 113/173] mst_fpga: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 115/173] slavio_misc: QOM cast cleanup for MiscState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 114/173] puv3_pm: QOM cast cleanup, Andreas Färber, 2013/07/29