diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/pci.h | 13 | ||||
-rw-r--r-- | include/asm-arm/pci.h | 13 | ||||
-rw-r--r-- | include/asm-generic/pci.h | 13 | ||||
-rw-r--r-- | include/asm-ia64/pci.h | 13 | ||||
-rw-r--r-- | include/asm-parisc/pci.h | 13 | ||||
-rw-r--r-- | include/asm-ppc/pci.h | 13 | ||||
-rw-r--r-- | include/asm-ppc64/pci.h | 13 | ||||
-rw-r--r-- | include/asm-sparc64/pci.h | 2 |
8 files changed, 93 insertions, 0 deletions
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h index f681e675b823..4e115f368d5f 100644 --- a/include/asm-alpha/pci.h +++ b/include/asm-alpha/pci.h | |||
@@ -254,6 +254,19 @@ extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *, | |||
254 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 254 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
255 | struct pci_bus_region *region); | 255 | struct pci_bus_region *region); |
256 | 256 | ||
257 | static inline struct resource * | ||
258 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
259 | { | ||
260 | struct resource *root = NULL; | ||
261 | |||
262 | if (res->flags & IORESOURCE_IO) | ||
263 | root = &ioport_resource; | ||
264 | if (res->flags & IORESOURCE_MEM) | ||
265 | root = &iomem_resource; | ||
266 | |||
267 | return root; | ||
268 | } | ||
269 | |||
257 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index | 270 | #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index |
258 | 271 | ||
259 | static inline int pci_proc_domain(struct pci_bus *bus) | 272 | static inline int pci_proc_domain(struct pci_bus *bus) |
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index 38ea5899a580..ead3ced38cb8 100644 --- a/include/asm-arm/pci.h +++ b/include/asm-arm/pci.h | |||
@@ -64,6 +64,19 @@ extern void | |||
64 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 64 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
65 | struct pci_bus_region *region); | 65 | struct pci_bus_region *region); |
66 | 66 | ||
67 | static inline struct resource * | ||
68 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
69 | { | ||
70 | struct resource *root = NULL; | ||
71 | |||
72 | if (res->flags & IORESOURCE_IO) | ||
73 | root = &ioport_resource; | ||
74 | if (res->flags & IORESOURCE_MEM) | ||
75 | root = &iomem_resource; | ||
76 | |||
77 | return root; | ||
78 | } | ||
79 | |||
67 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | 80 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) |
68 | { | 81 | { |
69 | } | 82 | } |
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index ee1d8b5d8168..c36a77d3bf44 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h | |||
@@ -30,6 +30,19 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | |||
30 | res->end = region->end; | 30 | res->end = region->end; |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline struct resource * | ||
34 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
35 | { | ||
36 | struct resource *root = NULL; | ||
37 | |||
38 | if (res->flags & IORESOURCE_IO) | ||
39 | root = &ioport_resource; | ||
40 | if (res->flags & IORESOURCE_MEM) | ||
41 | root = &iomem_resource; | ||
42 | |||
43 | return root; | ||
44 | } | ||
45 | |||
33 | #define pcibios_scan_all_fns(a, b) 0 | 46 | #define pcibios_scan_all_fns(a, b) 0 |
34 | 47 | ||
35 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 48 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index dba9f220be71..ef616fd4cb1b 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -156,6 +156,19 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev, | |||
156 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | 156 | extern void pcibios_bus_to_resource(struct pci_dev *dev, |
157 | struct resource *res, struct pci_bus_region *region); | 157 | struct resource *res, struct pci_bus_region *region); |
158 | 158 | ||
159 | static inline struct resource * | ||
160 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
161 | { | ||
162 | struct resource *root = NULL; | ||
163 | |||
164 | if (res->flags & IORESOURCE_IO) | ||
165 | root = &ioport_resource; | ||
166 | if (res->flags & IORESOURCE_MEM) | ||
167 | root = &iomem_resource; | ||
168 | |||
169 | return root; | ||
170 | } | ||
171 | |||
159 | #define pcibios_scan_all_fns(a, b) 0 | 172 | #define pcibios_scan_all_fns(a, b) 0 |
160 | 173 | ||
161 | #endif /* _ASM_IA64_PCI_H */ | 174 | #endif /* _ASM_IA64_PCI_H */ |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index 98d79a3d54fa..d0b761f690b5 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
@@ -257,6 +257,19 @@ extern void | |||
257 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 257 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
258 | struct pci_bus_region *region); | 258 | struct pci_bus_region *region); |
259 | 259 | ||
260 | static inline struct resource * | ||
261 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
262 | { | ||
263 | struct resource *root = NULL; | ||
264 | |||
265 | if (res->flags & IORESOURCE_IO) | ||
266 | root = &ioport_resource; | ||
267 | if (res->flags & IORESOURCE_MEM) | ||
268 | root = &iomem_resource; | ||
269 | |||
270 | return root; | ||
271 | } | ||
272 | |||
260 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | 273 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) |
261 | { | 274 | { |
262 | } | 275 | } |
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index a811e440c978..9dd06cd40096 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -109,6 +109,19 @@ extern void | |||
109 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 109 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
110 | struct pci_bus_region *region); | 110 | struct pci_bus_region *region); |
111 | 111 | ||
112 | static inline struct resource * | ||
113 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
114 | { | ||
115 | struct resource *root = NULL; | ||
116 | |||
117 | if (res->flags & IORESOURCE_IO) | ||
118 | root = &ioport_resource; | ||
119 | if (res->flags & IORESOURCE_MEM) | ||
120 | root = &iomem_resource; | ||
121 | |||
122 | return root; | ||
123 | } | ||
124 | |||
112 | extern void pcibios_add_platform_entries(struct pci_dev *dev); | 125 | extern void pcibios_add_platform_entries(struct pci_dev *dev); |
113 | 126 | ||
114 | struct file; | 127 | struct file; |
diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h index 4d057452f59b..a88bbfc26967 100644 --- a/include/asm-ppc64/pci.h +++ b/include/asm-ppc64/pci.h | |||
@@ -138,6 +138,19 @@ extern void | |||
138 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 138 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
139 | struct pci_bus_region *region); | 139 | struct pci_bus_region *region); |
140 | 140 | ||
141 | static inline struct resource * | ||
142 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
143 | { | ||
144 | struct resource *root = NULL; | ||
145 | |||
146 | if (res->flags & IORESOURCE_IO) | ||
147 | root = &ioport_resource; | ||
148 | if (res->flags & IORESOURCE_MEM) | ||
149 | root = &iomem_resource; | ||
150 | |||
151 | return root; | ||
152 | } | ||
153 | |||
141 | extern int | 154 | extern int |
142 | unmap_bus_range(struct pci_bus *bus); | 155 | unmap_bus_range(struct pci_bus *bus); |
143 | 156 | ||
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index a4ab0ec7143a..89bd71b1c0d8 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -269,6 +269,8 @@ extern void | |||
269 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 269 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
270 | struct pci_bus_region *region); | 270 | struct pci_bus_region *region); |
271 | 271 | ||
272 | extern struct resource *pcibios_select_root(struct pci_dev *, struct resource *); | ||
273 | |||
272 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | 274 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) |
273 | { | 275 | { |
274 | } | 276 | } |