diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-04 10:25:23 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-08 18:52:36 +0100 |
commit | 05245daf47b7c645d9952b476d63531f6d8aa7f8 (patch) | |
tree | 979fbf3aad5f5dce483b7a533e09d542a18932bb /hw/hppa/machine.c | |
parent | 0d98fbb57d4facff538a8155d1f3fa1eaf0111f0 (diff) | |
download | qemu-05245daf47b7c645d9952b476d63531f6d8aa7f8.zip qemu-05245daf47b7c645d9952b476d63531f6d8aa7f8.tar.gz qemu-05245daf47b7c645d9952b476d63531f6d8aa7f8.tar.bz2 |
dino: change dino_init() to return the DINO device instead of PCIBus
This is in preparation for using more qdev APIs during the configuration of the
HPPA generic machine.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-14-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/hppa/machine.c')
-rw-r--r-- | hw/hppa/machine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 971d7ff..94bc1b2 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -17,6 +17,7 @@ #include "hw/char/serial.h" #include "hw/net/lasi_82596.h" #include "hw/nmi.h" +#include "dino.h" #include "hppa_sys.h" #include "qemu/units.h" #include "qapi/error.h" @@ -126,7 +127,7 @@ static void machine_hppa_init(MachineState *machine) const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; - DeviceState *dev; + DeviceState *dev, *dino_dev; PCIBus *pci_bus; ISABus *isa_bus; qemu_irq rtc_irq, serial_irq; @@ -166,7 +167,8 @@ static void machine_hppa_init(MachineState *machine) lasi_init(addr_space); /* Init Dino (PCI host bus chip). */ - pci_bus = dino_init(addr_space, &rtc_irq, &serial_irq); + dino_dev = DEVICE(dino_init(addr_space, &rtc_irq, &serial_irq)); + pci_bus = PCI_BUS(qdev_get_child_bus(dino_dev, "pci")); assert(pci_bus); /* Create ISA bus. */ |