aboutsummaryrefslogtreecommitdiff
path: root/hw/char/serial.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-10-22 00:35:36 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-07 16:50:48 +0400
commit96651db423a0a25466629d35c775531f5145a66a (patch)
treeef3639f2ef0443d3e6238a882286e7f943f36f6a /hw/char/serial.c
parentff22c588f474c6799015365d25548ab845a4f5cd (diff)
downloadqemu-96651db423a0a25466629d35c775531f5145a66a.zip
qemu-96651db423a0a25466629d35c775531f5145a66a.tar.gz
qemu-96651db423a0a25466629d35c775531f5145a66a.tar.bz2
serial: add "baudbase" property
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/char/serial.c')
-rw-r--r--hw/char/serial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 1746dbc..a4f0566 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -988,7 +988,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
SerialState *s = SERIAL(dev);
s->irq = irq;
- s->baudbase = baudbase;
+ qdev_prop_set_uint32(dev, "baudbase", baudbase);
qdev_prop_set_chr(dev, "chardev", chr);
serial_realize_core(s, &error_fatal);
qdev_set_legacy_instance_id(dev, base, 2);
@@ -1002,6 +1002,7 @@ SerialState *serial_init(int base, qemu_irq irq, int baudbase,
static Property serial_properties[] = {
DEFINE_PROP_CHR("chardev", SerialState, chr),
+ DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1072,7 +1073,7 @@ SerialState *serial_mm_init(MemoryRegion *address_space,
s->it_shift = it_shift;
s->irq = irq;
- s->baudbase = baudbase;
+ qdev_prop_set_uint32(dev, "baudbase", baudbase);
qdev_prop_set_chr(dev, "chardev", chr);
serial_realize_core(s, &error_fatal);