sh: se7206: Handle non-SuperIO I/O ports.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 18 Sep 2007 06:41:39 +0000 (15:41 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 21 Sep 2007 02:57:54 +0000 (11:57 +0900)
This fixes up the port calculation logic for non-SuperIO accesses,
before these were always matching the MRSHPC base, now just make
sure the original port is handed back if it's not in the I/O port
range.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/se/7206/io.c

index eb30dc2df96f8280dff16dc47a4a84743b1dd8d9..1308e618e044d1a5aaa996ac934e26cb15201163 100644 (file)
@@ -30,6 +30,8 @@ port2adr(unsigned int port)
                return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
        else if (port >= 0x300 && port < 0x310)
                return (volatile __u16 *) (PA_SMSC + (port - 0x300));
+
+       return (volatile __u16 *)port;
 }
 
 unsigned char se7206_inb(unsigned long port)