aboutsummaryrefslogtreecommitdiff
path: root/hw/char/lm32_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/lm32_uart.c')
-rw-r--r--hw/char/lm32_uart.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c
index 4f2096637d..837a46e8e1 100644
--- a/hw/char/lm32_uart.c
+++ b/hw/char/lm32_uart.c
@@ -258,6 +258,7 @@ static int lm32_uart_init(SysBusDevice *dev)
"uart", R_MAX * 4);
sysbus_init_mmio(dev, &s->iomem);
+ /* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */
s->chr = qemu_char_get_next_serial();
if (s->chr) {
qemu_chr_add_handlers(s->chr, uart_can_rx, uart_rx, uart_event, s);
@@ -284,6 +285,8 @@ static void lm32_uart_class_init(ObjectClass *klass, void *data)
k->init = lm32_uart_init;
dc->reset = uart_reset;
dc->vmsd = &vmstate_lm32_uart;
+ /* Reason: init() method uses qemu_char_get_next_serial() */
+ dc->cannot_instantiate_with_device_add_yet = true;
}
static const TypeInfo lm32_uart_info = {