diff options
author | Bernhard Beschow | 2022-10-22 17:04:53 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2022-10-31 11:32:07 +0100 |
commit | d240d3fb14031ed2b00b86ab8e9082ba6bebce4d (patch) | |
tree | f985937512593ff8437f749d1651baf52289033c /hw/mips | |
parent | hw/isa/piix4: Add missing initialization (diff) | |
download | qemu-d240d3fb14031ed2b00b86ab8e9082ba6bebce4d.tar.gz qemu-d240d3fb14031ed2b00b86ab8e9082ba6bebce4d.tar.xz qemu-d240d3fb14031ed2b00b86ab8e9082ba6bebce4d.zip |
hw/isa/piix4: Move pci_ide_create_devs() call to board code
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>
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/malta.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 4f67d3ef1e..ecd889cedb 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -40,7 +40,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" @@ -1427,11 +1427,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")); |