diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-02-19 07:35:31 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-16 03:00:14 -0400 |
commit | 8ce0143b11cdc519b8e1fd94a262b654ef0bc3ab (patch) | |
tree | 912403b5b8b853ca1479e95590ac2fd057de0030 /arch/sh/kernel/io.c | |
parent | ef339f241b08a16af58897e6288ba200e0c7a8c7 (diff) |
sh: pci io port base address code
Adds a __get_pci_io_base() function which is used to match a port range
against struct pci_channel. This allows us to detect if a port range is
assigned to pci or happens to be legacy port io. While at it, remove unused
cpu-specific cruft.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/io.c')
-rw-r--r-- | arch/sh/kernel/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c index 29cf4588fc05..59fb020718a3 100644 --- a/arch/sh/kernel/io.c +++ b/arch/sh/kernel/io.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * for more details. | 12 | * for more details. |
13 | */ | 13 | */ |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/pci.h> | ||
15 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
@@ -69,6 +70,10 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr) | |||
69 | if (ret) | 70 | if (ret) |
70 | return ret; | 71 | return ret; |
71 | 72 | ||
73 | ret = __get_pci_io_base(port, nr); | ||
74 | if (ret) | ||
75 | return ret; | ||
76 | |||
72 | return __ioport_map(port, nr); | 77 | return __ioport_map(port, nr); |
73 | } | 78 | } |
74 | EXPORT_SYMBOL(ioport_map); | 79 | EXPORT_SYMBOL(ioport_map); |