summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/pci.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-20 16:38:00 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-20 16:38:00 +0900
commit0bb34a6bf1f71d5ad2abfda582a2c2794957bc7b (patch)
tree2ac5a8400ac65001b78f173b51bd41b0f38d9376 /arch/sh/include/asm/pci.h
parent394b6d2fe624246e258a218dac68d44fe9a8411f (diff)
sh: pci: Consolidate pci_iomap() and use the generic I/O base.
This consolidates the pci_iomap() definitions and reworks how the I/O port base is handled. PCI channels can register their own I/O map base, or if none is provided, the system-wide generic I/O base is used instead. Functionally nothing changes, while this allows us to kill off lots of I/O address special casing and lookups. 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.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index e8265fd0bb6..53242828977 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -26,6 +26,8 @@ struct pci_channel {
int enabled;
unsigned long reg_base;
unsigned long io_base;
+
+ unsigned long io_map_base;
};
/*
@@ -110,31 +112,11 @@ static inline int __is_pci_memory(unsigned long phys_addr, unsigned long size)
}
return 0;
}
-
-static inline void __iomem *__get_pci_io_base(unsigned long port,
- unsigned long size)
-{
- struct pci_channel *p;
- struct resource *res;
-
- for (p = board_pci_channels; p->init; p++) {
- res = p->io_resource;
- if (p->enabled && (port >= res->start) &&
- (port + size) <= (res->end + 1))
- return (void __iomem *)(p->io_base + port);
- }
- return NULL;
-}
#else
static inline int __is_pci_memory(unsigned long phys_addr, unsigned long size)
{
return 0;
}
-static inline void __iomem *__get_pci_io_base(unsigned long port,
- unsigned long size)
-{
- return NULL;
-}
#endif
/* Board-specific fixup routines. */