[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/13] q800: wire macfb IRQ to separate video interrupt on VIA2
From: |
Laurent Vivier |
Subject: |
[PULL 13/13] q800: wire macfb IRQ to separate video interrupt on VIA2 |
Date: |
Fri, 8 Oct 2021 13:45:18 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Whilst the in-built Quadra 800 framebuffer exists within the Nubus address
space for slot 9, it has its own dedicated interrupt on VIA2. Force the
macfb device to occupy slot 9 in the q800 machine and wire its IRQ to the
separate video interrupt since this is what is expected by the MacOS
interrupt handler.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-14-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/m68k/q800.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index df3fd3711e6e..fd4855047e3f 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -407,8 +407,10 @@ static void q800_init(MachineState *machine)
MAC_NUBUS_FIRST_SLOT * NUBUS_SUPER_SLOT_SIZE);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, NUBUS_SLOT_BASE +
MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE);
-
- for (i = 0; i < VIA2_NUBUS_IRQ_NB; i++) {
+ qdev_connect_gpio_out(dev, 9,
+ qdev_get_gpio_in_named(via2_dev, "nubus-irq",
+ VIA2_NUBUS_IRQ_INTVIDEO));
+ for (i = 1; i < VIA2_NUBUS_IRQ_NB; i++) {
qdev_connect_gpio_out(dev, 9 + i,
qdev_get_gpio_in_named(via2_dev, "nubus-irq",
VIA2_NUBUS_IRQ_9 + i));
@@ -419,6 +421,7 @@ static void q800_init(MachineState *machine)
/* framebuffer in nubus slot #9 */
dev = qdev_new(TYPE_NUBUS_MACFB);
+ qdev_prop_set_uint32(dev, "slot", 9);
qdev_prop_set_uint32(dev, "width", graphic_width);
qdev_prop_set_uint32(dev, "height", graphic_height);
qdev_prop_set_uint8(dev, "depth", graphic_depth);
--
2.31.1
- [PULL 00/13] M68k next patches, Laurent Vivier, 2021/10/08
- [PULL 01/13] macfb: handle errors that occur during realize, Laurent Vivier, 2021/10/08
- [PULL 04/13] macfb: fix overflow of color_palette array, Laurent Vivier, 2021/10/08
- [PULL 02/13] macfb: update macfb.c to use the Error API best practices, Laurent Vivier, 2021/10/08
- [PULL 09/13] macfb: add common monitor modes supported by the MacOS toolbox ROM, Laurent Vivier, 2021/10/08
- [PULL 10/13] macfb: fix up 1-bit pixel encoding, Laurent Vivier, 2021/10/08
- [PULL 12/13] macfb: add vertical blank interrupt, Laurent Vivier, 2021/10/08
- [PULL 06/13] macfb: add trace events for reading and writing the control registers, Laurent Vivier, 2021/10/08
- [PULL 11/13] macfb: fix 24-bit RGB pixel encoding, Laurent Vivier, 2021/10/08
- [PULL 13/13] q800: wire macfb IRQ to separate video interrupt on VIA2,
Laurent Vivier <=
- [PULL 05/13] macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer, Laurent Vivier, 2021/10/08
- [PULL 08/13] macfb: add qdev property to specify display type, Laurent Vivier, 2021/10/08
- [PULL 03/13] macfb: fix invalid object reference in macfb_common_realize(), Laurent Vivier, 2021/10/08
- [PULL 07/13] macfb: implement mode sense to allow display type to be detected, Laurent Vivier, 2021/10/08
- Re: [PULL 00/13] M68k next patches, Richard Henderson, 2021/10/08