Patchwork [08/11] malta: give ISA bus to ISA methods

login
register
mail settings
Submitter Hervé Poussineau
Date Dec. 14, 2011, 11:02 p.m.
Message ID <1323903763-22933-9-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/131490/
State New
Headers show

Comments

Hervé Poussineau - Dec. 14, 2011, 11:02 p.m.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/mips_malta.c |    3 +--
 hw/pc.h         |    2 +-
 hw/piix4.c      |    3 ++-
 3 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 98177f3..78d99e7 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -941,8 +941,7 @@  void mips_malta_init (ram_addr_t ram_size,
     /* Southbridge */
     ide_drive_get(hd, MAX_IDE_BUS);
 
-    piix4_devfn = piix4_init(pci_bus, 80);
-    isa_bus = NULL;
+    piix4_devfn = piix4_init(pci_bus, &isa_bus, 80);
 
     /* Interrupt controller */
     /* The 8259 is attached to the MIPS CPU INT0 pin, ie interrupt 2 */
diff --git a/hw/pc.h b/hw/pc.h
index 5afd16b..eeda4f1 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -196,7 +196,7 @@  PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn,
 
 /* piix4.c */
 extern PCIDevice *piix4_dev;
-int piix4_init(PCIBus *bus, int devfn);
+int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn);
 
 /* vga.c */
 enum vga_retrace_method {
diff --git a/hw/piix4.c b/hw/piix4.c
index 2fd1171..51af459 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -93,11 +93,12 @@  static int piix4_initfn(PCIDevice *dev)
     return 0;
 }
 
-int piix4_init(PCIBus *bus, int devfn)
+int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
 {
     PCIDevice *d;
 
     d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4");
+    *isa_bus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
     return d->devfn;
 }