aboutsummaryrefslogtreecommitdiff
path: root/hw/arm_l2x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm_l2x0.c')
-rw-r--r--hw/arm_l2x0.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/hw/arm_l2x0.c b/hw/arm_l2x0.c
index 2faed39f0f..7c5fe32fc5 100644
--- a/hw/arm_l2x0.c
+++ b/hw/arm_l2x0.c
@@ -160,22 +160,29 @@ static int l2x0_priv_init(SysBusDevice *dev)
return 0;
}
-static SysBusDeviceInfo l2x0_info = {
- .init = l2x0_priv_init,
- .qdev.name = "l2x0",
- .qdev.size = sizeof(l2x0_state),
- .qdev.vmsd = &vmstate_l2x0,
- .qdev.no_user = 1,
- .qdev.props = (Property[]) {
+static void l2x0_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = l2x0_priv_init;
+}
+
+static DeviceInfo l2x0_info = {
+ .name = "l2x0",
+ .size = sizeof(l2x0_state),
+ .vmsd = &vmstate_l2x0,
+ .no_user = 1,
+ .props = (Property[]) {
DEFINE_PROP_UINT32("type", l2x0_state, cache_type, 0x1c100100),
DEFINE_PROP_END_OF_LIST(),
},
- .qdev.reset = l2x0_priv_reset,
+ .reset = l2x0_priv_reset,
+ .class_init = l2x0_class_init,
};
static void l2x0_register_device(void)
{
- sysbus_register_withprop(&l2x0_info);
+ sysbus_qdev_register(&l2x0_info);
}
device_init(l2x0_register_device)