diff mbox series

[1/2] hw/char/ibex_uart: set user-creatable

Message ID 20210811093838.18719-2-damien.hedde@greensocs.com (mailing list archive)
State New, archived
Headers show
Series Set user creatable for flag ibex uart and plic | expand

Commit Message

Damien Hedde Aug. 11, 2021, 9:38 a.m. UTC
The ibex_uart meets the criteria to be user_creatable: all
parameters are set from properties.
Note that this patch, alone, does not allow to create an instance
with -device cli option or device_add qmp command. Since it is
a sysbus device, additional authorization must be done by the
machine.

Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
---
 hw/char/ibex_uart.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c
index 9b0a817713..b1646422c0 100644
--- a/hw/char/ibex_uart.c
+++ b/hw/char/ibex_uart.c
@@ -546,6 +546,7 @@  static void ibex_uart_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
+    dc->user_creatable = true;
     dc->reset = ibex_uart_reset;
     dc->realize = ibex_uart_realize;
     dc->vmsd = &vmstate_ibex_uart;