Merge tag 'stable/for-linus-3.19-rc0b-tag' of git://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / arch / mips / lib / iomap.c
index d51d5cb..8e7e378 100644 (file)
@@ -6,7 +6,6 @@
  * (C) Copyright 2007 MIPS Technologies, Inc.
  *     written by Ralf Baechle <ralf@linux-mips.org>
  */
-#include <linux/pci.h>
 #include <linux/module.h>
 #include <asm/io.h>
 
@@ -98,14 +97,14 @@ EXPORT_SYMBOL(iowrite32be);
 
 /*
  * These are the "repeat MMIO read/write" functions.
- * Note the "__raw" accesses, since we don't want to
- * convert to CPU byte order. We write in "IO byte
- * order" (we also don't have IO barriers).
+ * Note the "__mem" accesses, since we want to convert
+ * to CPU byte order if the host bus happens to not match the
+ * endianness of PCI/ISA (see mach-generic/mangle-port.h).
  */
 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count)
 {
        while (--count >= 0) {
-               u8 data = __raw_readb(addr);
+               u8 data = __mem_readb(addr);
                *dst = data;
                dst++;
        }
@@ -114,7 +113,7 @@ static inline void mmio_insb(void __iomem *addr, u8 *dst, int count)
 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count)
 {
        while (--count >= 0) {
-               u16 data = __raw_readw(addr);
+               u16 data = __mem_readw(addr);
                *dst = data;
                dst++;
        }
@@ -123,7 +122,7 @@ static inline void mmio_insw(void __iomem *addr, u16 *dst, int count)
 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count)
 {
        while (--count >= 0) {
-               u32 data = __raw_readl(addr);
+               u32 data = __mem_readl(addr);
                *dst = data;
                dst++;
        }
@@ -132,7 +131,7 @@ static inline void mmio_insl(void __iomem *addr, u32 *dst, int count)
 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count)
 {
        while (--count >= 0) {
-               __raw_writeb(*src, addr);
+               __mem_writeb(*src, addr);
                src++;
        }
 }
@@ -140,7 +139,7 @@ static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count)
 static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count)
 {
        while (--count >= 0) {
-               __raw_writew(*src, addr);
+               __mem_writew(*src, addr);
                src++;
        }
 }
@@ -148,7 +147,7 @@ static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count)
 static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count)
 {
        while (--count >= 0) {
-               __raw_writel(*src, addr);
+               __mem_writel(*src, addr);
                src++;
        }
 }