Merge master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git] / arch / m32r / kernel / io_m32700ut.c
index e545b06..5898f40 100644 (file)
@@ -11,7 +11,6 @@
  *  archive for more details.
  */
 
-#include <linux/config.h>
 #include <asm/m32r.h>
 #include <asm/page.h>
 #include <asm/io.h>
@@ -36,7 +35,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int);
 
 static inline void *_port2addr(unsigned long port)
 {
-       return (void *)(port + NONCACHE_OFFSET);
+       return (void *)(port | NONCACHE_OFFSET);
 }
 
 #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
@@ -45,15 +44,15 @@ static inline void *__port2addr_ata(unsigned long port)
        static int      dummy_reg;
 
        switch (port) {
-       case 0x1f0:     return (void *)0xac002000;
-       case 0x1f1:     return (void *)0xac012800;
-       case 0x1f2:     return (void *)0xac012002;
-       case 0x1f3:     return (void *)0xac012802;
-       case 0x1f4:     return (void *)0xac012004;
-       case 0x1f5:     return (void *)0xac012804;
-       case 0x1f6:     return (void *)0xac012006;
-       case 0x1f7:     return (void *)0xac012806;
-       case 0x3f6:     return (void *)0xac01200e;
+       case 0x1f0:     return (void *)(0x0c002000 | NONCACHE_OFFSET);
+       case 0x1f1:     return (void *)(0x0c012800 | NONCACHE_OFFSET);
+       case 0x1f2:     return (void *)(0x0c012002 | NONCACHE_OFFSET);
+       case 0x1f3:     return (void *)(0x0c012802 | NONCACHE_OFFSET);
+       case 0x1f4:     return (void *)(0x0c012004 | NONCACHE_OFFSET);
+       case 0x1f5:     return (void *)(0x0c012804 | NONCACHE_OFFSET);
+       case 0x1f6:     return (void *)(0x0c012006 | NONCACHE_OFFSET);
+       case 0x1f7:     return (void *)(0x0c012806 | NONCACHE_OFFSET);
+       case 0x3f6:     return (void *)(0x0c01200e | NONCACHE_OFFSET);
        default:        return (void *)&dummy_reg;
        }
 }
@@ -64,11 +63,11 @@ static inline void *__port2addr_ata(unsigned long port)
  * from 0x10000000 to 0x13ffffff on physical address.
  * The base address of LAN controller(LAN91C111) is 0x300.
  */
-#define LAN_IOSTART    0x300
-#define LAN_IOEND      0x320
+#define LAN_IOSTART    (0x300 | NONCACHE_OFFSET)
+#define LAN_IOEND      (0x320 | NONCACHE_OFFSET)
 static inline void *_port2addr_ne(unsigned long port)
 {
-       return (void *)(port + NONCACHE_OFFSET + 0x10000000);
+       return (void *)(port + 0x10000000);
 }
 static inline void *_port2addr_usb(unsigned long port)
 {