On 9/1/23 18:23, Bernhard Beschow wrote:
Aligns the code with PIIX3 such that PIIXState can be used in PIIX4,
too.

Signed-off-by: Bernhard Beschow <shen...@gmail.com>
Reviewed-by: Michael S. Tsirkin <m...@redhat.com>
Message-Id: <20221022150508.26830-33-shen...@gmail.com>
---
  hw/isa/piix4.c  | 28 ++++++++++------------------
  hw/mips/malta.c | 11 +++++++++--
  hw/mips/Kconfig |  1 +
  3 files changed, 20 insertions(+), 20 deletions(-)

@@ -1459,7 +1461,12 @@ void mips_malta_init(MachineState *machine)
      pci_ide_create_devs(PCI_DEVICE(dev));
/* Interrupt controller */
-    qdev_connect_gpio_out_named(DEVICE(piix4), "intr", 0, i8259_irq);
+    dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "pic"));
+    i8259 = i8259_init(isa_bus, i8259_irq);
+    for (i = 0; i < ISA_NUM_IRQS; i++) {
+        qdev_connect_gpio_out(dev, i, i8259[i]);
+    }
+    g_free(i8259);
/* generate SPD EEPROM data */
      dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "pm"));
diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
index 4e7042f03d..d156de812c 100644
--- a/hw/mips/Kconfig
+++ b/hw/mips/Kconfig
@@ -1,5 +1,6 @@
  config MALTA
      bool
+    select I8259
      select ISA_SUPERIO
      select PIIX4

The PIIX4 owns / exposes the I8259, so we don't need to select it here.
The Malta board only initializes it. Why did you have to add this?

Reply via email to