[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/55] hw/isa/piix4: Move pci_ide_create_devs() call to board code
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 51/55] hw/isa/piix4: Move pci_ide_create_devs() call to board code |
Date: |
Sun, 30 Oct 2022 23:28:37 +0100 |
From: Bernhard Beschow <shentey@gmail.com>
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>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20221022150508.26830-29-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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 9126eb9edf..8fc1db6dc9 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -257,7 +257,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 6ac811763c..5a4e2abbdf 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"
@@ -1400,11 +1400,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
- [PULL 40/55] hw/i386/pc: Create DMA controllers in south bridges, (continued)
- [PULL 40/55] hw/i386/pc: Create DMA controllers in south bridges, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 41/55] hw/isa/piix3: Remove extra ';' outside of functions, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 42/55] hw/isa/piix3: Add size constraints to rcr_ops, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 44/55] hw/isa/piix3: Prefer pci_address_space() over get_system_memory(), Philippe Mathieu-Daudé, 2022/10/30
- [PULL 45/55] hw/isa/piix4: Rename wrongly named method, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 46/55] hw/ide/piix: Introduce TYPE_ macros for PIIX IDE controllers, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 43/55] hw/isa/piix3: Modernize reset handling, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 47/55] hw/isa/piix3: Remove unused include, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 48/55] hw/mips/malta: Reuse dev variable, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 49/55] hw/isa/Kconfig: Fix dependencies of piix4 southbridge, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 51/55] hw/isa/piix4: Move pci_ide_create_devs() call to board code,
Philippe Mathieu-Daudé <=
- [PULL 50/55] hw/isa/piix4: Add missing initialization, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 52/55] hw/mips/boston: Don't set link_up for xilinx-pcie, Philippe Mathieu-Daudé, 2022/10/30
- Re: [PULL 00/55] MIPS patches for 2022-10-30, Philippe Mathieu-Daudé, 2022/10/31
- Re: [PULL 00/55] MIPS patches for 2022-10-30, Stefan Hajnoczi, 2022/10/31