[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/10] hw/isa: Add the ISA_IRQ_SER_DEFAULT definition
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 03/10] hw/isa: Add the ISA_IRQ_SER_DEFAULT definition |
Date: |
Sun, 11 Oct 2020 21:32:22 +0200 |
The first serial port uses IRQ #4 by default. Add this
default definition to the IsaIrqNumber enum.
Avoid magic values in the code, replace them by the
newly introduced definition.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/isa/isa.h | 1 +
hw/sparc64/sun4u.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index e139b88c992..519296d5823 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -10,6 +10,7 @@
enum IsaIrqNumber {
ISA_IRQ_KBD_DEFAULT = 1,
+ ISA_IRQ_SER_DEFAULT = 4,
ISA_NUM_IRQS = 16
};
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d4c39490cd9..6e42467d5cc 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -619,7 +619,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_KBD_IRQ));
qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 12,
qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_MSE_IRQ));
- qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 4,
+ qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", ISA_IRQ_SER_DEFAULT,
qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_SER_IRQ));
switch (vga_interface_type) {
--
2.26.2