mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
hw/acpi/piix4: use qdev gpio to wire up sci_irq
Introduce piix4_pm_init() instance init function and use it to initialise the separate qdev gpio for the SCI IRQ. The sci_irq can now be wired up directly using a qdev gpio instead of having to set the IRQ externally in piix4_pm_initfn(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220528091934.15520-9-mark.cave-ayland@ilande.co.uk> [PMD: Partially squash 20220528091934.15520-8-mark.cave-ayland@ilande.co.uk] Reviewed-by: Bernhard Beschow <shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
d0af99ac12
commit
29786d42ba
4 changed files with 15 additions and 10 deletions
|
@ -311,9 +311,9 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbus)
|
|||
|
||||
pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci");
|
||||
if (smbus) {
|
||||
pms = piix4_pm_initfn(pci_bus, devfn + 3, 0x1100,
|
||||
qdev_get_gpio_in_named(dev, "isa", 9),
|
||||
NULL, 0);
|
||||
pms = piix4_pm_initfn(pci_bus, devfn + 3, 0x1100, NULL, 0);
|
||||
qdev_connect_gpio_out(DEVICE(pms), 0,
|
||||
qdev_get_gpio_in_named(dev, "isa", 9));
|
||||
*smbus = I2C_BUS(qdev_get_child_bus(DEVICE(pms), "i2c"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue