aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomasz Nowicki <tn@semihalf.com>2016-05-30 17:14:22 +0200
committerGraeme Gregory <graeme.gregory@linaro.org>2016-06-07 14:09:23 +0100
commite9ecc14f69837944becb3e1b34c4f30f9faeb038 (patch)
tree27e3f8f1e52a02b261323bee2e15108eb028e297 /include
parentd495683e95654f5a6f4091fc9c5b2f4a3b7468c5 (diff)
pci, acpi: ARM64 support for ACPI based generic PCI host controller
This patch implements pci_acpi_scan_root call so that ARM64 can start using ACPI to setup and enumerate PCI buses. The implementation of pci_acpi_scan_root() looks up config space regions through MCFG interface. Then ECAM library is doing a new mapping and attach generic ECAM ops which are used for accessing config space. On ARM64, ACPI and DT can be enabled together, and in that case we need to use generic domains. In order to do that we implement ARM64 specific way of retrieving domain number from pci_config_window structure. Since we enable PCI for ACPI we need to implement raw_pci_{read|write} at the same time. ARM64 provides RAW accessors as long as there is correlated valid pci_bus structure, but not before. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9661c8572d21..f66d1881c2d9 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1390,7 +1390,12 @@ static inline int pci_domain_nr(struct pci_bus *bus)
{
return bus->domain_nr;
}
+/* Arch specific ACPI hook to set-up domain number */
+#ifdef CONFIG_ACPI
+int acpi_pci_bus_domain_nr(struct pci_bus *bus);
+#else
static inline int acpi_pci_bus_domain_nr(struct pci_bus *bus) { return -1; }
+#endif
void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent);
#else
static inline void pci_bus_assign_domain_nr(struct pci_bus *bus,