summaryrefslogtreecommitdiff
path: root/hw/acpi/piix4.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-06-02 15:25:24 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 16:41:51 +0300
commit781bbd6bec587606b1b98b78512f2bba64183b0c (patch)
treef3147e2e03bd9c1e64bf3f0518bd52501841713a /hw/acpi/piix4.c
parentf816a62daa05ae3b973c76834be7f319b2d02f03 (diff)
downloadqemu-781bbd6bec587606b1b98b78512f2bba64183b0c.tar.gz
qemu-781bbd6bec587606b1b98b78512f2bba64183b0c.tar.bz2
qemu-781bbd6bec587606b1b98b78512f2bba64183b0c.zip
pc: add acpi-device link to PCMachineState
the link will used later to access device implementing ACPI functions instead of adhoc lookup in QOM tree. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/piix4.c')
-rw-r--r--hw/acpi/piix4.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 17627ee675..01b3b4cb64 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -483,13 +483,17 @@ Object *piix4_pm_find(void)
I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
qemu_irq sci_irq, qemu_irq smi_irq,
- int kvm_enabled, FWCfgState *fw_cfg)
+ int kvm_enabled, FWCfgState *fw_cfg,
+ DeviceState **piix4_pm)
{
DeviceState *dev;
PIIX4PMState *s;
dev = DEVICE(pci_create(bus, devfn, TYPE_PIIX4_PM));
qdev_prop_set_uint32(dev, "smb_io_base", smb_io_base);
+ if (piix4_pm) {
+ *piix4_pm = dev;
+ }
s = PIIX4_PM(dev);
s->irq = sci_irq;