diff options
-rw-r--r-- | arch/arm/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/pci.h | 11 | ||||
-rw-r--r-- | arch/arm/include/asm/pci.h | 15 | ||||
-rw-r--r-- | arch/arm/kernel/bios32.c | 3 |
4 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5c8128c76996..88f9334110cf 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1074,6 +1074,10 @@ config PCI | |||
1074 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or | 1074 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or |
1075 | VESA. If you have PCI, say Y, otherwise N. | 1075 | VESA. If you have PCI, say Y, otherwise N. |
1076 | 1076 | ||
1077 | config PCI_DOMAINS | ||
1078 | bool | ||
1079 | depends on PCI | ||
1080 | |||
1077 | config PCI_SYSCALL | 1081 | config PCI_SYSCALL |
1078 | def_bool PCI | 1082 | def_bool PCI |
1079 | 1083 | ||
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index a38bdc7afa34..52f0da1e97df 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -8,10 +8,16 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_MACH_PCI_H | ||
12 | #define __ASM_MACH_PCI_H | ||
13 | |||
11 | struct pci_sys_data; | 14 | struct pci_sys_data; |
12 | struct pci_bus; | 15 | struct pci_bus; |
13 | 16 | ||
14 | struct hw_pci { | 17 | struct hw_pci { |
18 | #ifdef CONFIG_PCI_DOMAINS | ||
19 | int domain; | ||
20 | #endif | ||
15 | struct list_head buses; | 21 | struct list_head buses; |
16 | int nr_controllers; | 22 | int nr_controllers; |
17 | int (*setup)(int nr, struct pci_sys_data *); | 23 | int (*setup)(int nr, struct pci_sys_data *); |
@@ -26,6 +32,9 @@ struct hw_pci { | |||
26 | * Per-controller structure | 32 | * Per-controller structure |
27 | */ | 33 | */ |
28 | struct pci_sys_data { | 34 | struct pci_sys_data { |
35 | #ifdef CONFIG_PCI_DOMAINS | ||
36 | int domain; | ||
37 | #endif | ||
29 | struct list_head node; | 38 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 39 | int busnr; /* primary bus number */ |
31 | u64 mem_offset; /* bus->cpu memory mapping offset */ | 40 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
@@ -70,3 +79,5 @@ extern int pci_v3_setup(int nr, struct pci_sys_data *); | |||
70 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | 79 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); |
71 | extern void pci_v3_preinit(void); | 80 | extern void pci_v3_preinit(void); |
72 | extern void pci_v3_postinit(void); | 81 | extern void pci_v3_postinit(void); |
82 | |||
83 | #endif /* __ASM_MACH_PCI_H */ | ||
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 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <asm-generic/pci-dma-compat.h> | 5 | #include <asm-generic/pci-dma-compat.h> |
6 | 6 | ||
7 | #include <asm/mach/pci.h> /* for pci_sys_data */ | ||
7 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ | 8 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ |
8 | 9 | ||
10 | #ifdef CONFIG_PCI_DOMAINS | ||
11 | static inline int pci_domain_nr(struct pci_bus *bus) | ||
12 | { | ||
13 | struct pci_sys_data *root = bus->sysdata; | ||
14 | |||
15 | return root->domain; | ||
16 | } | ||
17 | |||
18 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
19 | { | ||
20 | return pci_domain_nr(bus); | ||
21 | } | ||
22 | #endif /* CONFIG_PCI_DOMAINS */ | ||
23 | |||
9 | #ifdef CONFIG_PCI_HOST_ITE8152 | 24 | #ifdef CONFIG_PCI_HOST_ITE8152 |
10 | /* ITE bridge requires setting latency timer to avoid early bus access | 25 | /* ITE bridge requires setting latency timer to avoid early bus access |
11 | termination by PIC bus mater devices | 26 | termination by PIC bus mater devices |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index bd397e0b663e..c6273a3bfc25 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -527,6 +527,9 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
527 | if (!sys) | 527 | if (!sys) |
528 | panic("PCI: unable to allocate sys data!"); | 528 | panic("PCI: unable to allocate sys data!"); |
529 | 529 | ||
530 | #ifdef CONFIG_PCI_DOMAINS | ||
531 | sys->domain = hw->domain; | ||
532 | #endif | ||
530 | sys->hw = hw; | 533 | sys->hw = hw; |
531 | sys->busnr = busnr; | 534 | sys->busnr = busnr; |
532 | sys->swizzle = hw->swizzle; | 535 | sys->swizzle = hw->swizzle; |