Commit 48ff3e04 authored by Paul Mundt's avatar Paul Mundt

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 17d857be
...@@ -147,6 +147,9 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count) ...@@ -147,6 +147,9 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count)
void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) void __iomem *generic_ioport_map(unsigned long addr, unsigned int size)
{ {
if (PXSEG(addr) >= P1SEG)
return (void __iomem *)addr;
return (void __iomem *)(addr + generic_io_base); return (void __iomem *)(addr + generic_io_base);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment