diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-04 10:25:27 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-08 18:52:36 +0100 |
commit | a4b74c1924b79b91ca6aeb20cdd39156b5c7b4f7 (patch) | |
tree | 2fa373c0ad0434fc480869728df946b668b93d65 /hw | |
parent | 4b5faaf94ff3cf47a6c63393ed1332ef4928dadf (diff) | |
download | qemu-a4b74c1924b79b91ca6aeb20cdd39156b5c7b4f7.zip qemu-a4b74c1924b79b91ca6aeb20cdd39156b5c7b4f7.tar.gz qemu-a4b74c1924b79b91ca6aeb20cdd39156b5c7b4f7.tar.bz2 |
dino: wire up serial IRQ using a qdev GPIO in machine.c
This makes it unnecessary to allocate a separate IRQ for the serial port.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-18-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/hppa/dino.c | 8 | ||||
-rw-r--r-- | hw/hppa/hppa_sys.h | 2 | ||||
-rw-r--r-- | hw/hppa/machine.c | 7 |
3 files changed, 6 insertions, 11 deletions
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index f58aebf..80ffe27 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -404,13 +404,8 @@ static void dino_set_timer_irq(void *opaque, int irq, int level) /* ??? Not connected. */ } -static void dino_set_serial_irq(void *opaque, int irq, int level) -{ - dino_set_irq(opaque, 10, level); -} - DinoState *dino_init(MemoryRegion *addr_space, - qemu_irq *p_rtc_irq, qemu_irq *p_ser_irq) + qemu_irq *p_rtc_irq) { DeviceState *dev; DinoState *s; @@ -422,7 +417,6 @@ DinoState *dino_init(MemoryRegion *addr_space, sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); *p_rtc_irq = qemu_allocate_irq(dino_set_timer_irq, s, 0); - *p_ser_irq = qemu_allocate_irq(dino_set_serial_irq, s, 0); return s; } diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h index 88773d2..c238e7e 100644 --- a/hw/hppa/hppa_sys.h +++ b/hw/hppa/hppa_sys.h @@ -11,7 +11,7 @@ #include "hppa_hardware.h" #include "dino.h" -DinoState *dino_init(MemoryRegion *, qemu_irq *, qemu_irq *); +DinoState *dino_init(MemoryRegion *, qemu_irq *); DeviceState *lasi_init(MemoryRegion *); #define enable_lasi_lan() 0 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 5a490a9..f757aec 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -130,7 +130,7 @@ static void machine_hppa_init(MachineState *machine) DeviceState *dev, *dino_dev; PCIBus *pci_bus; ISABus *isa_bus; - qemu_irq rtc_irq, serial_irq; + qemu_irq rtc_irq; char *firmware_filename; uint64_t firmware_low, firmware_high; long size; @@ -167,7 +167,7 @@ static void machine_hppa_init(MachineState *machine) lasi_init(addr_space); /* Init Dino (PCI host bus chip). */ - dino_dev = DEVICE(dino_init(addr_space, &rtc_irq, &serial_irq)); + dino_dev = DEVICE(dino_init(addr_space, &rtc_irq)); memory_region_add_subregion(addr_space, DINO_HPA, sysbus_mmio_get_region( SYS_BUS_DEVICE(dino_dev), 0)); @@ -184,7 +184,8 @@ static void machine_hppa_init(MachineState *machine) /* Serial code setup. */ if (serial_hd(0)) { uint32_t addr = DINO_UART_HPA + 0x800; - serial_mm_init(addr_space, addr, 0, serial_irq, + serial_mm_init(addr_space, addr, 0, + qdev_get_gpio_in(dino_dev, DINO_IRQ_RS232INT), 115200, serial_hd(0), DEVICE_BIG_ENDIAN); } |