diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-28 02:04:04 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-28 02:04:04 -0400 |
commit | 48ff3e04ffd5e1b578462eb1958f15ca122c7fbf (patch) | |
tree | 378fdbbbb81699f2c5cf2d57e187c7f7b9843fa5 /arch/sh | |
parent | 17d857be649a21ca90008c6dc425d849fa83db5c (diff) |
sh: Handle ioport_map() cases for >= P1SEG addresses.
This fixes up the case where certain drivers already do their own
remapping and subsequently attempt to use the PIO calls for I/O. In this
case there is no additional remapping that needs to be done, and the
address can be casted in to the cookie directly.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/io_generic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c index 4ff507239286..b8fa6524760a 100644 --- a/arch/sh/kernel/io_generic.c +++ b/arch/sh/kernel/io_generic.c | |||
@@ -147,6 +147,9 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count) | |||
147 | 147 | ||
148 | void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) | 148 | void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) |
149 | { | 149 | { |
150 | if (PXSEG(addr) >= P1SEG) | ||
151 | return (void __iomem *)addr; | ||
152 | |||
150 | return (void __iomem *)(addr + generic_io_base); | 153 | return (void __iomem *)(addr + generic_io_base); |
151 | } | 154 | } |
152 | 155 | ||