diff mbox series

[2/8] q800: move VIA1 IRQ from level 1 to level 6

Message ID 20211013212132.31519-3-mark.cave-ayland@ilande.co.uk
State New
Headers show
Series q800: GLUE updates for A/UX mode | expand

Commit Message

Mark Cave-Ayland Oct. 13, 2021, 9:21 p.m. UTC
On a Quadra 800 machine Linux sets via_alt_mapping to 1 and clears port B bit 6 to
ensure that the VIA1 IRQ is delivered at level 6 rather than level 1. Even though
QEMU doesn't yet emulate this behaviour, Linux still installs the VIA1 level 1 IRQ
handler regardless of the value of via_alt_mapping which is why the kernel has been
able to boot until now.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/m68k/q800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Vivier Oct. 15, 2021, 6:24 a.m. UTC | #1
Le 13/10/2021 à 23:21, Mark Cave-Ayland a écrit :
> On a Quadra 800 machine Linux sets via_alt_mapping to 1 and clears port B bit 6 to
> ensure that the VIA1 IRQ is delivered at level 6 rather than level 1. Even though
> QEMU doesn't yet emulate this behaviour, Linux still installs the VIA1 level 1 IRQ
> handler regardless of the value of via_alt_mapping which is why the kernel has been
> able to boot until now.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/m68k/q800.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
> index fd4855047e..15f3067811 100644
> --- a/hw/m68k/q800.c
> +++ b/hw/m68k/q800.c
> @@ -284,7 +284,7 @@ static void q800_init(MachineState *machine)
>      sysbus = SYS_BUS_DEVICE(via1_dev);
>      sysbus_realize_and_unref(sysbus, &error_fatal);
>      sysbus_mmio_map(sysbus, 1, VIA_BASE);
> -    sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 0));
> +    sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 5));
>  
>      adb_bus = qdev_get_child_bus(via1_dev, "adb.0");
>      dev = qdev_new(TYPE_ADB_KEYBOARD);
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff mbox series

Patch

diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index fd4855047e..15f3067811 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -284,7 +284,7 @@  static void q800_init(MachineState *machine)
     sysbus = SYS_BUS_DEVICE(via1_dev);
     sysbus_realize_and_unref(sysbus, &error_fatal);
     sysbus_mmio_map(sysbus, 1, VIA_BASE);
-    sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 0));
+    sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, 5));
 
     adb_bus = qdev_get_child_bus(via1_dev, "adb.0");
     dev = qdev_new(TYPE_ADB_KEYBOARD);