mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-03 17:11:01 +00:00
hw/sparc/leon3: Map the UART device unconditionally
The UART is present on the chipset regardless there is a character device connected to it. Map it unconditionally. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com> Message-Id: <20200608172144.20461-2-f4bug@amsat.org>
This commit is contained in:
parent
28c78fe818
commit
acd2a001e0
@ -339,16 +339,14 @@ static void leon3_generic_hw_init(MachineState *machine)
|
||||
0, LEON3_TIMER_IRQ, GRLIB_APBIO_AREA);
|
||||
|
||||
/* Allocate uart */
|
||||
if (serial_hd(0)) {
|
||||
dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
|
||||
qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
|
||||
qdev_init_nofail(dev);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
|
||||
grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
|
||||
GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
|
||||
LEON3_UART_IRQ, GRLIB_APBIO_AREA);
|
||||
}
|
||||
dev = qdev_create(NULL, TYPE_GRLIB_APB_UART);
|
||||
qdev_prop_set_chr(dev, "chrdev", serial_hd(0));
|
||||
qdev_init_nofail(dev);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, LEON3_UART_OFFSET);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irqs[LEON3_UART_IRQ]);
|
||||
grlib_apb_pnp_add_entry(apb_pnp, LEON3_UART_OFFSET, 0xFFF,
|
||||
GRLIB_VENDOR_GAISLER, GRLIB_APBUART_DEV, 1,
|
||||
LEON3_UART_IRQ, GRLIB_APBIO_AREA);
|
||||
}
|
||||
|
||||
static void leon3_generic_machine_init(MachineClass *mc)
|
||||
|
Loading…
Reference in New Issue
Block a user