qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 06/26] pci_bridge: add helper function to convert PC


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH 06/26] pci_bridge: add helper function to convert PCIBridge into PCIDevice
Date: Wed, 16 Mar 2011 18:29:17 +0900

pci_bridge_to_pci() which converts PCIBridge into PCIDevice which will
be used later by pci_p2pbr.

Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Isaku Yamahata <address@hidden>
---
 hw/pci_bridge.c |    6 ++++++
 hw/pci_bridge.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c
index 464d897..00b6b76 100644
--- a/hw/pci_bridge.c
+++ b/hw/pci_bridge.c
@@ -52,6 +52,12 @@ int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
     return pos;
 }
 
+/* Accessor function to get PCI device from pci bridge. */
+PCIDevice *pci_bridge_to_pci(PCIBridge *br)
+{
+    return &br->dev;
+}
+
 /* Accessor function to get parent bridge device from pci bus. */
 PCIDevice *pci_bridge_get_device(PCIBus *bus)
 {
diff --git a/hw/pci_bridge.h b/hw/pci_bridge.h
index 84411a6..c306992 100644
--- a/hw/pci_bridge.h
+++ b/hw/pci_bridge.h
@@ -31,6 +31,7 @@
 int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
                           uint16_t svid, uint16_t ssid);
 
+PCIDevice *pci_bridge_to_pci(PCIBridge *br);
 PCIDevice *pci_bridge_get_device(PCIBus *bus);
 PCIBus *pci_bridge_get_sec_bus(PCIBridge *br);
 
-- 
1.7.1.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]