[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/55] hw/mips/fuloong2e: Inline vt82c686b_southbridge_init() and
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 11/55] hw/mips/fuloong2e: Inline vt82c686b_southbridge_init() and remove it |
Date: |
Sun, 30 Oct 2022 23:27:57 +0100 |
From: Bernhard Beschow <shentey@gmail.com>
The previous patches moved most of this function into the via-isa device
model such that it has become fairly trivial. So inline it for
simplicity.
Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220901114127.53914-12-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/mips/fuloong2e.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 2d8723ab74..3c46215616 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -196,22 +196,6 @@ static void main_cpu_reset(void *opaque)
}
}
-static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq
intc,
- I2CBus **i2c_bus)
-{
- PCIDevice *dev, *via;
-
- via = pci_create_simple_multifunction(pci_bus, PCI_DEVFN(slot, 0), true,
- TYPE_VT82C686B_ISA);
- qdev_connect_gpio_out(DEVICE(via), 0, intc);
-
- dev = PCI_DEVICE(object_resolve_path_component(OBJECT(via), "ide"));
- pci_ide_create_devs(dev);
-
- dev = PCI_DEVICE(object_resolve_path_component(OBJECT(via), "pm"));
- *i2c_bus = I2C_BUS(qdev_get_child_bus(DEVICE(dev), "i2c"));
-}
-
/* Network support */
static void network_init(PCIBus *pci_bus)
{
@@ -308,8 +292,16 @@ static void mips_fuloong2e_init(MachineState *machine)
pci_bus = bonito_init((qemu_irq *)&(env->irq[2]));
/* South bridge -> IP5 */
- vt82c686b_southbridge_init(pci_bus, FULOONG2E_VIA_SLOT, env->irq[5],
- &smbus);
+ pci_dev = pci_create_simple_multifunction(pci_bus,
+ PCI_DEVFN(FULOONG2E_VIA_SLOT, 0),
+ true, TYPE_VT82C686B_ISA);
+ qdev_connect_gpio_out(DEVICE(pci_dev), 0, env->irq[5]);
+
+ dev = DEVICE(object_resolve_path_component(OBJECT(pci_dev), "ide"));
+ pci_ide_create_devs(PCI_DEVICE(dev));
+
+ dev = DEVICE(object_resolve_path_component(OBJECT(pci_dev), "pm"));
+ smbus = I2C_BUS(qdev_get_child_bus(dev, "i2c"));
/* GPU */
if (vga_interface_type != VGA_NONE) {
--
2.37.3
- [PULL 01/55] hw/isa/vt82c686: Resolve chip-specific realize methods, (continued)
- [PULL 01/55] hw/isa/vt82c686: Resolve chip-specific realize methods, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 02/55] hw/isa/vt82c686: Resolve unneeded attribute, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 03/55] hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory(), Philippe Mathieu-Daudé, 2022/10/30
- [PULL 04/55] hw/isa/vt82c686: Reuse errp, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 05/55] hw/isa/vt82c686: Introduce TYPE_VIA_IDE define, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 06/55] hw/isa/vt82c686: Instantiate IDE function in host device, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 07/55] hw/isa/vt82c686: Introduce TYPE_VT82C686B_USB_UHCI define, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 08/55] hw/isa/vt82c686: Instantiate USB functions in host device, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 09/55] hw/isa/vt82c686: Instantiate PM function in host device, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 10/55] hw/isa/vt82c686: Instantiate AC97 and MC97 functions in host device, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 11/55] hw/mips/fuloong2e: Inline vt82c686b_southbridge_init() and remove it,
Philippe Mathieu-Daudé <=
- [PULL 12/55] hw/isa/vt82c686: Embed RTCState in host device, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 13/55] hw/isa/vt82c686: Create rtc-time alias in boards instead, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 14/55] hw: Remove unused MAX_IDE_BUS define, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 15/55] disas/nanomips: Remove namespace img, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 16/55] disas/nanomips: Extract enums out of the NMD class, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 17/55] disas/nanomips: Delete NMD class field, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 18/55] disas/nanomips: Delete NMD class second field, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 19/55] disas/nanomips: Remove helper methods from class, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 20/55] disas/nanomips: Remove __cond methods from class, Philippe Mathieu-Daudé, 2022/10/30
- [PULL 21/55] disas/nanomips: Remove disasm methods from class, Philippe Mathieu-Daudé, 2022/10/30