diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-10-23 18:07:03 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-07 17:24:29 +0400 |
commit | 80b2eed95dd6397541cc4d7ec36db0e182a8f402 (patch) | |
tree | 1854959962dbb3920dc8d7884f1f050e3cdea655 /hw/char/serial.c | |
parent | 17fd1a6490b1d66cdfa60c67060e63da71a43a51 (diff) |
serial-mm: add endianness property
Add a qdev property for endianness, so memory region setup can be done
in realize.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/char/serial.c')
-rw-r--r-- | hw/char/serial.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c index f11f2cdbf3..1d350a851b 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -1093,6 +1093,7 @@ SerialMM *serial_mm_init(MemoryRegion *address_space, qdev_prop_set_uint32(DEVICE(s), "baudbase", baudbase); qdev_prop_set_chr(DEVICE(s), "chardev", chr); qdev_set_legacy_instance_id(DEVICE(s), base, 2); + qdev_prop_set_uint8(DEVICE(self), "endianness", end); qdev_init_nofail(DEVICE(smm)); @@ -1118,6 +1119,7 @@ static Property serial_mm_properties[] = { * previous one. */ DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0), + DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_ENDIAN), DEFINE_PROP_END_OF_LIST(), }; |