diff mbox

[v3,1/6] ipmi fwinfo: Remove ACPI parent, add the device

Message ID 1463144831-4502-2-git-send-email-minyard@acm.org
State New
Headers show

Commit Message

Corey Minyard May 13, 2016, 1:07 p.m. UTC
From: Corey Minyard <cminyard@mvista.com>


Instead of storing the ACPI parent, store the device in
the fwinfo structure for IPMI.  This way a future change
that scans the IPMI devices for firmware can select the
devices on a particular bus.

This will let the ACPI scope be defined by the calling
code so the IPMI code doesn't have to know the scope.

Signed-off-by: Corey Minyard <cminyard@mvista.com>

---
 hw/ipmi/isa_ipmi_bt.c  | 2 +-
 hw/ipmi/isa_ipmi_kcs.c | 2 +-
 include/hw/ipmi/ipmi.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c
index aaea12e..9ee3979 100644
--- a/hw/ipmi/isa_ipmi_bt.c
+++ b/hw/ipmi/isa_ipmi_bt.c
@@ -449,8 +449,8 @@  static void isa_ipmi_bt_realize(DeviceState *dev, Error **errp)
     iib->fwinfo.memspace = IPMI_MEMSPACE_IO;
     iib->fwinfo.irq_type = IPMI_LEVEL_IRQ;
     iib->fwinfo.interrupt_number = iib->isairq;
-    iib->fwinfo.acpi_parent = "\\_SB.PCI0.ISA";
     iib->fwinfo.i2c_slave_address = iib->bt.bmc->slave_addr;
+    iib->fwinfo.dev = dev;
     ipmi_add_fwinfo(&iib->fwinfo, errp);
 }
 
diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c
index 2742ce0..09ba92d 100644
--- a/hw/ipmi/isa_ipmi_kcs.c
+++ b/hw/ipmi/isa_ipmi_kcs.c
@@ -413,7 +413,7 @@  static void ipmi_isa_realize(DeviceState *dev, Error **errp)
     iik->fwinfo.memspace = IPMI_MEMSPACE_IO;
     iik->fwinfo.irq_type = IPMI_LEVEL_IRQ;
     iik->fwinfo.interrupt_number = iik->isairq;
-    iik->fwinfo.acpi_parent = "\\_SB.PCI0.ISA";
+    iik->fwinfo.dev = dev;
     ipmi_add_fwinfo(&iik->fwinfo, errp);
 }
 
diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h
index 74a2b5a..1874c55 100644
--- a/include/hw/ipmi/ipmi.h
+++ b/include/hw/ipmi/ipmi.h
@@ -196,7 +196,7 @@  typedef struct IPMIFwInfo {
         IPMI_EDGE_IRQ
     } irq_type;
 
-    const char *acpi_parent;
+    DeviceState *dev;
 } IPMIFwInfo;
 
 void ipmi_add_fwinfo(IPMIFwInfo *info, Error **errp);