]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ppc64: Big-endian I/O memory accessors.
authorArthur Othieno <a.othieno@bluewin.ch>
Sun, 21 Aug 2005 01:48:47 +0000 (21:48 -0400)
committerPaul Mackerras <paulus@samba.org>
Fri, 9 Sep 2005 12:11:38 +0000 (22:11 +1000)
I/O memory accessors. Big-endian version. For those busses/devices
that do export big-endian I/O memory.

Of notable relevance/reference:

   http://lwn.net/Articles/132804/
   http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019798.html
   http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019752.html

Signed-Off-By: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc64/kernel/iomap.c

index 153cc8b0f13611be8471a87dba6d1765d1e4bee5..95b0baf875226b755e9d844cd735ff3c756b1945 100644 (file)
@@ -22,13 +22,23 @@ unsigned int fastcall ioread16(void __iomem *addr)
 {
        return readw(addr);
 }
+unsigned int fastcall ioread16be(void __iomem *addr)
+{
+       return in_be16(addr);
+}
 unsigned int fastcall ioread32(void __iomem *addr)
 {
        return readl(addr);
 }
+unsigned int fastcall ioread32be(void __iomem *addr)
+{
+       return in_be32(addr);
+}
 EXPORT_SYMBOL(ioread8);
 EXPORT_SYMBOL(ioread16);
+EXPORT_SYMBOL(ioread16be);
 EXPORT_SYMBOL(ioread32);
+EXPORT_SYMBOL(ioread32be);
 
 void fastcall iowrite8(u8 val, void __iomem *addr)
 {
@@ -38,13 +48,23 @@ void fastcall iowrite16(u16 val, void __iomem *addr)
 {
        writew(val, addr);
 }
+void fastcall iowrite16be(u16 val, void __iomem *addr)
+{
+       out_be16(addr, val);
+}
 void fastcall iowrite32(u32 val, void __iomem *addr)
 {
        writel(val, addr);
 }
+void fastcall iowrite32be(u32 val, void __iomem *addr)
+{
+       out_be32(addr, val);
+}
 EXPORT_SYMBOL(iowrite8);
 EXPORT_SYMBOL(iowrite16);
+EXPORT_SYMBOL(iowrite16be);
 EXPORT_SYMBOL(iowrite32);
+EXPORT_SYMBOL(iowrite32be);
 
 /*
  * These are the "repeat read/write" functions. Note the