summaryrefslogtreecommitdiff
path: root/hw/display/sm501.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-11-22 14:36:23 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-07 16:06:59 +0400
commit7aca3782d93d96cc5e123617d9e1de783365d4dd (patch)
treee90b32fa9ed8ebf30c9b5f9386be02dd1bd41517 /hw/display/sm501.c
parentcdbc5c51c8755e4e9ce964fc92ba755e1c71a914 (diff)
downloadqemu-7aca3782d93d96cc5e123617d9e1de783365d4dd.zip
hw/display/sm501: Always map the UART0
The SM501 is a Mobile Multimedia Companion Chip with 2 UARTs. This model only implements the first UART. Being part of the chipset, the UART block is always mapped in memory, regardless of whether we provide a chardev backend. Since commit 12051d82f, qemu_chr_fe_init() accepts a NULL chardev. Let's remove the chardev check and always map the UART in the chipset memory. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191122133623.13004-1-philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/sm501.c')
-rw-r--r--hw/display/sm501.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 1f33c87e65..79bd7bc2d1 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -1958,11 +1958,9 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp)
sysbus_pass_irq(sbd, SYS_BUS_DEVICE(usb_dev));
/* bridge to serial emulation module */
- if (s->chr_state) {
- serial_mm_init(&s->state.mmio_region, SM501_UART0, 2,
- NULL, /* TODO : chain irq to IRL */
- 115200, s->chr_state, DEVICE_LITTLE_ENDIAN);
- }
+ serial_mm_init(&s->state.mmio_region, SM501_UART0, 2,
+ NULL, /* TODO : chain irq to IRL */
+ 115200, s->chr_state, DEVICE_LITTLE_ENDIAN);
}
static Property sm501_sysbus_properties[] = {