@@ -9,6 +9,7 @@
#include "qom/object.h"
enum IsaIrqNumber {
+ ISA_IRQ_KBD_DEFAULT = 1,
ISA_NUM_IRQS = 16
};
@@ -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));
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é <f4bug@amsat.org> --- include/hw/isa/isa.h | 1 + hw/sparc64/sun4u.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)