diff options
Diffstat (limited to 'hw/char/lm32_juart.c')
-rw-r--r-- | hw/char/lm32_juart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c index 628a86fc06..62763f2f43 100644 --- a/hw/char/lm32_juart.c +++ b/hw/char/lm32_juart.c @@ -117,6 +117,7 @@ static int lm32_juart_init(SysBusDevice *dev) { LM32JuartState *s = LM32_JUART(dev); + /* 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, juart_can_rx, juart_rx, juart_event, s); @@ -144,6 +145,8 @@ static void lm32_juart_class_init(ObjectClass *klass, void *data) k->init = lm32_juart_init; dc->reset = juart_reset; dc->vmsd = &vmstate_lm32_juart; + /* Reason: init() method uses qemu_char_get_next_serial() */ + dc->cannot_instantiate_with_device_add_yet = true; } static const TypeInfo lm32_juart_info = { |