The PS2 keyboard uses IRQ #1 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é <f4...@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 2a052ffa025..e139b88c992 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -9,6 +9,7 @@ #include "qom/object.h" enum IsaIrqNumber { + ISA_IRQ_KBD_DEFAULT = 1, ISA_NUM_IRQS = 16 }; diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index ad5ca2472a4..d4c39490cd9 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -615,7 +615,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_LPT_IRQ)); qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 6, qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_FDD_IRQ)); - qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 1, + qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", ISA_IRQ_KBD_DEFAULT, 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)); -- 2.26.2