[Top][All Lists]
[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
- [Qemu-devel] [PATCH 00/26] q35 chipset support for native pci express support, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 10/26] ide/ahci/ich: use qdev.reset, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 06/26] pci_bridge: add helper function to convert PCIBridge into PCIDevice,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 25/26] pci_ids: add intel 82801BA pci-to-pci bridge id and PCI_CLASS_SERIAL_SMBUS, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 13/26] usb/uhci: add ich9 usb uhci id's device, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 01/26] pci: replace the magic, 256, for the maximum of slot, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 17/26] pc, pc_piix: split out pc nic initialization, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 16/26] pc, pc_piix: split out allocating isa irqs, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 14/26] ide: consolidate drive_get(IF_IDE), Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 11/26] ahci: add ide device initialization helper, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 18/26] ioapic: move ioapic_init() from pc_piix.c to pc.c, Isaku Yamahata, 2011/03/16
- [Qemu-devel] [PATCH 02/26] pci: add opaque argument to pci_map_irq_fn, Isaku Yamahata, 2011/03/16