aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-05-28 10:02:11 +0100
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-06-11 11:44:32 +0200
commitb49e94424cbdc2f02725dcd37b8916ff64f74dcd (patch)
treeff586d6bef0be661bfd4e46c684824da1a81be26 /hw/acpi
parent29786d42ba4ab6a70d3055083512e0bdd8e2f9ec (diff)
hw/acpi/piix4: use qdev gpio to wire up smi_irq
Initialize the SMI IRQ in piix4_pm_init(). The smi_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-10-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>
Diffstat (limited to 'hw/acpi')
-rw-r--r--hw/acpi/piix4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index fe5ec0a723..32033bc9d7 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -502,10 +502,11 @@ static void piix4_pm_init(Object *obj)
PIIX4PMState *s = PIIX4_PM(obj);
qdev_init_gpio_out(DEVICE(obj), &s->irq, 1);
+ qdev_init_gpio_out_named(DEVICE(obj), &s->smi_irq, "smi-irq", 1);
}
PIIX4PMState *piix4_pm_initfn(PCIBus *bus, int devfn, uint32_t smb_io_base,
- qemu_irq smi_irq, bool smm_enabled)
+ bool smm_enabled)
{
PCIDevice *pci_dev;
DeviceState *dev;
@@ -517,7 +518,6 @@ PIIX4PMState *piix4_pm_initfn(PCIBus *bus, int devfn, uint32_t smb_io_base,
qdev_prop_set_bit(dev, "smm-enabled", smm_enabled);
s = PIIX4_PM(dev);
- s->smi_irq = smi_irq;
pci_realize_and_unref(pci_dev, bus, &error_fatal);