aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/pci.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-09-15 04:52:34 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:23 -0400
commit870d3d98eb343fa0f079773653f6dbdd17f410ed (patch)
tree334a8efce430cfc0244ab6506444d4918fdbcb15 /include/asm-mips/pci.h
parent61ed242d7e9d96dfb2e2f37058f5c822e5c6ca55 (diff)
Reorder & reformat a bit.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/pci.h')
-rw-r--r--include/asm-mips/pci.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index c9a00ca1c012..87ced6a5b5dd 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -142,8 +142,22 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
142 142
143extern void pcibios_resource_to_bus(struct pci_dev *dev, 143extern void pcibios_resource_to_bus(struct pci_dev *dev,
144 struct pci_bus_region *region, struct resource *res); 144 struct pci_bus_region *region, struct resource *res);
145extern void pcibios_bus_to_resource(struct pci_dev *dev, 145
146 struct resource *res, struct pci_bus_region *region); 146extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
147 struct pci_bus_region *region);
148
149static inline struct resource *
150pcibios_select_root(struct pci_dev *pdev, struct resource *res)
151{
152 struct resource *root = NULL;
153
154 if (res->flags & IORESOURCE_IO)
155 root = &ioport_resource;
156 if (res->flags & IORESOURCE_MEM)
157 root = &iomem_resource;
158
159 return root;
160}
147 161
148#ifdef CONFIG_PCI_DOMAINS 162#ifdef CONFIG_PCI_DOMAINS
149 163
@@ -169,17 +183,4 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev)
169/* Do platform specific device initialization at pci_enable_device() time */ 183/* Do platform specific device initialization at pci_enable_device() time */
170extern int pcibios_plat_dev_init(struct pci_dev *dev); 184extern int pcibios_plat_dev_init(struct pci_dev *dev);
171 185
172static inline struct resource *
173pcibios_select_root(struct pci_dev *pdev, struct resource *res)
174{
175 struct resource *root = NULL;
176
177 if (res->flags & IORESOURCE_IO)
178 root = &ioport_resource;
179 if (res->flags & IORESOURCE_MEM)
180 root = &iomem_resource;
181
182 return root;
183}
184
185#endif /* _ASM_PCI_H */ 186#endif /* _ASM_PCI_H */