diff options
Diffstat (limited to 'hw/char/cadence_uart.c')
-rw-r--r-- | hw/char/cadence_uart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index a5dc2a4366..d1453782a7 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -483,6 +483,7 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL, fifo_trigger_update, s); + /* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() */ s->chr = qemu_char_get_next_serial(); if (s->chr) { @@ -536,6 +537,8 @@ static void cadence_uart_class_init(ObjectClass *klass, void *data) dc->realize = cadence_uart_realize; dc->vmsd = &vmstate_cadence_uart; dc->reset = cadence_uart_reset; + /* Reason: realize() method uses qemu_char_get_next_serial() */ + dc->cannot_instantiate_with_device_add_yet = true; } static const TypeInfo cadence_uart_info = { |