[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/42] hw/isa/piix4: Move pci_ide_create_devs() call to board cod
From: |
Bernhard Beschow |
Subject: |
[PATCH 25/42] hw/isa/piix4: Move pci_ide_create_devs() call to board code |
Date: |
Thu, 1 Sep 2022 18:25:56 +0200 |
For the VIA south bridges there was a comment to have the call in board code.
Move it there for PIIX4 as well for consistency.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/piix4.c | 1 -
hw/mips/malta.c | 10 ++++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 9e2f7b9b71..67881e3a75 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -256,7 +256,6 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
if (!qdev_realize(DEVICE(&s->ide), BUS(pci_bus), errp)) {
return;
}
- pci_ide_create_devs(PCI_DEVICE(&s->ide));
/* USB */
qdev_prop_set_int32(DEVICE(&s->uhci), "addr", dev->devfn + 2);
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 0ec2ac2eaf..a4b866a2cf 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -39,7 +39,7 @@
#include "hw/pci/pci.h"
#include "qemu/log.h"
#include "hw/mips/bios.h"
-#include "hw/ide.h"
+#include "hw/ide/pci.h"
#include "hw/irq.h"
#include "hw/loader.h"
#include "elf.h"
@@ -1402,11 +1402,13 @@ void mips_malta_init(MachineState *machine)
/* Southbridge */
piix4 = pci_create_simple_multifunction(pci_bus, PCI_DEVFN(10, 0), true,
TYPE_PIIX4_PCI_DEVICE);
- dev = DEVICE(piix4);
- isa_bus = ISA_BUS(qdev_get_child_bus(dev, "isa.0"));
+ isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(piix4), "isa.0"));
+
+ dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "ide"));
+ pci_ide_create_devs(PCI_DEVICE(dev));
/* Interrupt controller */
- qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq);
+ qdev_connect_gpio_out_named(DEVICE(piix4), "intr", 0, i8259_irq);
/* generate SPD EEPROM data */
dev = DEVICE(object_resolve_path_component(OBJECT(piix4), "pm"));
--
2.37.3
- [PATCH 24/42] hw/isa/piix4: Add missing initialization, (continued)
- [PATCH 24/42] hw/isa/piix4: Add missing initialization, Bernhard Beschow, 2022/09/01
- [PATCH 28/42] hw/isa/piix4: Remove unused code, Bernhard Beschow, 2022/09/01
- [PATCH 21/42] hw/isa/piix3: Rename typedef PIIX3State to PIIXState, Bernhard Beschow, 2022/09/01
- [PATCH 41/42] hw/isa/piix: Drop the "3" from the PIIX base class, Bernhard Beschow, 2022/09/01
- [PATCH 30/42] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Bernhard Beschow, 2022/09/01
- [PATCH 27/42] hw/isa/piix4: Allow board to provide PCI interrupt routes, Bernhard Beschow, 2022/09/01
- [PATCH 26/42] hw/isa/piix4: Make PIIX4's ACPI and USB functions optional, Bernhard Beschow, 2022/09/01
- [PATCH 25/42] hw/isa/piix4: Move pci_ide_create_devs() call to board code,
Bernhard Beschow <=
- [PATCH 35/42] hw/isa/piix: Harmonize names of reset control memory regions, Bernhard Beschow, 2022/09/01
- [PATCH 33/42] hw/isa/piix4: Prefix pci_slot_get_pirq() with "piix4_", Bernhard Beschow, 2022/09/01
- [PATCH 40/42] hw/isa/piix: Share PIIX3 base class with PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 37/42] hw/isa/piix: Rename functions to be shared for interrupt triggering, Bernhard Beschow, 2022/09/01
- [PATCH 38/42] hw/isa/piix: Consolidate IRQ triggering, Bernhard Beschow, 2022/09/01
- [PATCH 29/42] hw/isa/piix4: Use ISA PIC device, Bernhard Beschow, 2022/09/01
- [PATCH 36/42] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 39/42] hw/isa/piix: Unexport PIIXState, Bernhard Beschow, 2022/09/01