aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2022-06-03 20:50:41 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-06-11 11:44:50 +0200
commite8ebf54936fcaa0da1ccd60f2c20df93f5aa68d1 (patch)
tree432d54d06f686f3f69414166e15a58a5fb6ed455 /hw/mips
parent19e375db22461b255d32704ad289508e0f1d9947 (diff)
downloadqemu-e8ebf54936fcaa0da1ccd60f2c20df93f5aa68d1.zip
qemu-e8ebf54936fcaa0da1ccd60f2c20df93f5aa68d1.tar.gz
qemu-e8ebf54936fcaa0da1ccd60f2c20df93f5aa68d1.tar.bz2
hw/isa/piix4: Inline and remove piix4_create()
During the previous changesets piix4_create() became a trivial wrapper around more generic functions. Modernize the code. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20220603185045.143789-8-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/malta.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index be9f26d..7a0ec51 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1237,6 +1237,7 @@ void mips_malta_init(MachineState *machine)
int fl_idx = 0;
int be;
MaltaState *s;
+ PCIDevice *piix4;
DeviceState *dev;
DeviceState *pm_dev;
@@ -1400,7 +1401,9 @@ void mips_malta_init(MachineState *machine)
empty_slot_init("GT64120", 0, 0x20000000);
/* Southbridge */
- dev = piix4_create(pci_bus);
+ 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"));
pm_dev = DEVICE(object_resolve_path_component(OBJECT(dev), "pm"));
smbus = I2C_BUS(qdev_get_child_bus(pm_dev, "i2c"));