summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/pci.h
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2010-04-19 13:20:49 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-22 21:38:11 +0100
commit52882173cfed4fabcc1496755000bf022d681e52 (patch)
tree6f30bfd65acd01fa8eda00df14fd17b318268c73 /arch/arm/include/asm/pci.h
parente193ba290f0228453341b41ab2bbdd963259f97e (diff)
downloadlinux-52882173cfed4fabcc1496755000bf022d681e52.tar.bz2
ARM: 6058/1: Add support for PCI domains
This patch adds support for PCI domains on ARM platforms. Also, protect asm/mach/pci.h from multiple inclustions, otherwise build fails because of pci_domain_nr() and pci_proc_domain() redefinitions. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/pci.h')
-rw-r--r--arch/arm/include/asm/pci.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 47980118d0a5..92e2a833693d 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -4,8 +4,23 @@
#ifdef __KERNEL__
#include <asm-generic/pci-dma-compat.h>
+#include <asm/mach/pci.h> /* for pci_sys_data */
#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
+#ifdef CONFIG_PCI_DOMAINS
+static inline int pci_domain_nr(struct pci_bus *bus)
+{
+ struct pci_sys_data *root = bus->sysdata;
+
+ return root->domain;
+}
+
+static inline int pci_proc_domain(struct pci_bus *bus)
+{
+ return pci_domain_nr(bus);
+}
+#endif /* CONFIG_PCI_DOMAINS */
+
#ifdef CONFIG_PCI_HOST_ITE8152
/* ITE bridge requires setting latency timer to avoid early bus access
termination by PIC bus mater devices