aboutsummaryrefslogtreecommitdiff
path: root/hw/xilinx_uartlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xilinx_uartlite.c')
-rw-r--r--hw/xilinx_uartlite.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c
index 6533df934f..8baabc72bb 100644
--- a/hw/xilinx_uartlite.c
+++ b/hw/xilinx_uartlite.c
@@ -211,10 +211,22 @@ static int xilinx_uartlite_init(SysBusDevice *dev)
return 0;
}
+static void xilinx_uartlite_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
+
+ sdc->init = xilinx_uartlite_init;
+}
+
+static DeviceInfo xilinx_uartlite_info = {
+ .name = "xilinx,uartlite",
+ .size = sizeof (struct xlx_uartlite),
+ .class_init = xilinx_uartlite_class_init,
+};
+
static void xilinx_uart_register(void)
{
- sysbus_register_dev("xilinx,uartlite", sizeof (struct xlx_uartlite),
- xilinx_uartlite_init);
+ sysbus_qdev_register(&xilinx_uartlite_info);
}
device_init(xilinx_uart_register)