aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/pci.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-20 02:38:25 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-20 02:38:25 -0400
commit9ade1217c9ba39ad2f004a898ddfbb815fd5fe74 (patch)
tree5983659bb85a596df5a9f17042c2d6af6f3511b9 /arch/sh/include/asm/pci.h
parent62c7ae87cb5962d3dfaa6d916a15e4faa9e07363 (diff)
sh: pci: Drop asm-generic/pci.h, so we can use our own fixups.
The new PCI code wants its own bus<->resource mappings instead of the generic equivalents, so drop the asm-generic include in preparation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/pci.h')
-rw-r--r--arch/sh/include/asm/pci.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index bb2c2fcddc9e..69cb615c3916 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -146,13 +146,34 @@ int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin);
146int pciauto_assign_resources(int busno, struct pci_channel *hose); 146int pciauto_assign_resources(int busno, struct pci_channel *hose);
147#endif 147#endif
148 148
149#endif /* __KERNEL__ */ 149extern void pcibios_resource_to_bus(struct pci_dev *dev,
150 struct pci_bus_region *region, struct resource *res);
151
152extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
153 struct pci_bus_region *region);
154
155static inline struct resource *
156pcibios_select_root(struct pci_dev *pdev, struct resource *res)
157{
158 struct resource *root = NULL;
159
160 if (res->flags & IORESOURCE_IO)
161 root = &ioport_resource;
162 if (res->flags & IORESOURCE_MEM)
163 root = &iomem_resource;
150 164
151/* generic pci stuff */ 165 return root;
152#include <asm-generic/pci.h> 166}
167
168/* Chances are this interrupt is wired PC-style ... */
169static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
170{
171 return channel ? 15 : 14;
172}
153 173
154/* generic DMA-mapping stuff */ 174/* generic DMA-mapping stuff */
155#include <asm-generic/pci-dma-compat.h> 175#include <asm-generic/pci-dma-compat.h>
156 176
177#endif /* __KERNEL__ */
157#endif /* __ASM_SH_PCI_H */ 178#endif /* __ASM_SH_PCI_H */
158 179