diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-02-20 12:51:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-02-27 13:27:05 +0000 |
commit | dc1daf392c7cc6d1481bd9ce40a5594e624e7b47 (patch) | |
tree | f69776994360a479a65f1c1265c1ce0dcaccc716 /hw/microblaze | |
parent | 3440a4a93aebb2abe9d9ed6ba4a0f8db86b2a6ad (diff) | |
download | qemu-dc1daf392c7cc6d1481bd9ce40a5594e624e7b47.zip qemu-dc1daf392c7cc6d1481bd9ce40a5594e624e7b47.tar.gz qemu-dc1daf392c7cc6d1481bd9ce40a5594e624e7b47.tar.bz2 |
hw/char/xilinx_uartlite: Open-code xilinx_uartlite_create()
Open-code the single use of xilinx_uartlite_create().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230220115114.25237-6-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/microblaze')
-rw-r--r-- | hw/microblaze/petalogix_s3adsp1800_mmu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 9d959d1..505639c 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -100,8 +100,11 @@ petalogix_s3adsp1800_init(MachineState *machine) irq[i] = qdev_get_gpio_in(dev, i); } - xilinx_uartlite_create(UARTLITE_BASEADDR, irq[UARTLITE_IRQ], - serial_hd(0)); + dev = qdev_new(TYPE_XILINX_UARTLITE); + qdev_prop_set_chr(dev, "chardev", serial_hd(0)); + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, UARTLITE_BASEADDR); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[UARTLITE_IRQ]); /* 2 timers at irq 2 @ 62 Mhz. */ dev = qdev_new("xlnx.xps-timer"); |