summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2015-10-14 14:29:39 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-16 22:18:51 +0200
commit2c204383a2922cd6b79b9d78680a049a2144fbcc (patch)
tree390f857746c8ea5e58493629dcbcaa0f3489f8c2 /include
parent3f7abdefc07755d67e2b2b63608d3128f6e0b3c5 (diff)
downloadblackbird-op-linux-2c204383a2922cd6b79b9d78680a049a2144fbcc.tar.gz
blackbird-op-linux-2c204383a2922cd6b79b9d78680a049a2144fbcc.zip
PCI/ACPI: Add interface acpi_pci_root_create()
Introduce common interface acpi_pci_root_create() and related data structures to create PCI root bus for ACPI PCI host bridges. It will be used to kill duplicated arch specific code for IA64 and x86. It may also help ARM64 in future. Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci-acpi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index a965efa52152..89ab0572dbc6 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -52,6 +52,30 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
return ACPI_HANDLE(dev);
}
+struct acpi_pci_root;
+struct acpi_pci_root_ops;
+
+struct acpi_pci_root_info {
+ struct acpi_pci_root *root;
+ struct acpi_device *bridge;
+ struct acpi_pci_root_ops *ops;
+ struct list_head resources;
+ char name[16];
+};
+
+struct acpi_pci_root_ops {
+ struct pci_ops *pci_ops;
+ int (*init_info)(struct acpi_pci_root_info *info);
+ void (*release_info)(struct acpi_pci_root_info *info);
+ int (*prepare_resources)(struct acpi_pci_root_info *info);
+};
+
+extern int acpi_pci_probe_root_resources(struct acpi_pci_root_info *info);
+extern struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
+ struct acpi_pci_root_ops *ops,
+ struct acpi_pci_root_info *info,
+ void *sd);
+
void acpi_pci_add_bus(struct pci_bus *bus);
void acpi_pci_remove_bus(struct pci_bus *bus);
OpenPOWER on IntegriCloud