diff options
author | Rob Herring <rob.herring@calxeda.com> | 2011-06-29 12:46:54 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2011-07-12 12:13:07 -0400 |
commit | f4ffd5e5dfdae561e3ea449eb2160a8d155cdec4 (patch) | |
tree | 4a8d567fd5cc76493da0daa3c79022b49fe1eff1 /arch/microblaze | |
parent | 0e47ff1ce65bbd0b12a9421a2756b26987ea5083 (diff) |
pci: move microblaze and powerpc pci flag functions into asm-generic
Move separate microblaze and powerpc pci flag functions pci_set_flags,
pci_add_flags, and pci_has_flag into asm-generic/pci-bridge.h so other
archs can use them.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/include/asm/pci-bridge.h | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 746df91e5796..4cae1d590130 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
@@ -10,31 +10,19 @@ | |||
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <asm-generic/pci-bridge.h> | ||
13 | 14 | ||
14 | struct device_node; | 15 | struct device_node; |
15 | 16 | ||
16 | enum { | 17 | #ifdef CONFIG_PCI |
17 | /* Force re-assigning all resources (ignore firmware | 18 | extern struct list_head hose_list; |
18 | * setup completely) | 19 | extern int pcibios_vaddr_is_ioport(void __iomem *address); |
19 | */ | 20 | #else |
20 | PCI_REASSIGN_ALL_RSRC = 0x00000001, | 21 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) |
21 | 22 | { | |
22 | /* Re-assign all bus numbers */ | 23 | return 0; |
23 | PCI_REASSIGN_ALL_BUS = 0x00000002, | 24 | } |
24 | 25 | #endif | |
25 | /* Do not try to assign, just use existing setup */ | ||
26 | PCI_PROBE_ONLY = 0x00000004, | ||
27 | |||
28 | /* Don't bother with ISA alignment unless the bridge has | ||
29 | * ISA forwarding enabled | ||
30 | */ | ||
31 | PCI_CAN_SKIP_ISA_ALIGN = 0x00000008, | ||
32 | |||
33 | /* Enable domain numbers in /proc */ | ||
34 | PCI_ENABLE_PROC_DOMAINS = 0x00000010, | ||
35 | /* ... except for domain 0 */ | ||
36 | PCI_COMPAT_DOMAIN_0 = 0x00000020, | ||
37 | }; | ||
38 | 26 | ||
39 | /* | 27 | /* |
40 | * Structure of a PCI controller (host bridge) | 28 | * Structure of a PCI controller (host bridge) |
@@ -164,40 +152,5 @@ extern struct pci_controller *pcibios_alloc_controller(struct device_node *dev); | |||
164 | extern void pcibios_free_controller(struct pci_controller *phb); | 152 | extern void pcibios_free_controller(struct pci_controller *phb); |
165 | extern void pcibios_setup_phb_resources(struct pci_controller *hose); | 153 | extern void pcibios_setup_phb_resources(struct pci_controller *hose); |
166 | 154 | ||
167 | #ifdef CONFIG_PCI | ||
168 | extern unsigned int pci_flags; | ||
169 | |||
170 | static inline void pci_set_flags(int flags) | ||
171 | { | ||
172 | pci_flags = flags; | ||
173 | } | ||
174 | |||
175 | static inline void pci_add_flags(int flags) | ||
176 | { | ||
177 | pci_flags |= flags; | ||
178 | } | ||
179 | |||
180 | static inline int pci_has_flag(int flag) | ||
181 | { | ||
182 | return pci_flags & flag; | ||
183 | } | ||
184 | |||
185 | extern struct list_head hose_list; | ||
186 | |||
187 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | ||
188 | #else | ||
189 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) | ||
190 | { | ||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | static inline void pci_set_flags(int flags) { } | ||
195 | static inline void pci_add_flags(int flags) { } | ||
196 | static inline int pci_has_flag(int flag) | ||
197 | { | ||
198 | return 0; | ||
199 | } | ||
200 | #endif /* CONFIG_PCI */ | ||
201 | |||
202 | #endif /* __KERNEL__ */ | 155 | #endif /* __KERNEL__ */ |
203 | #endif /* _ASM_MICROBLAZE_PCI_BRIDGE_H */ | 156 | #endif /* _ASM_MICROBLAZE_PCI_BRIDGE_H */ |