microblaze: io.h: Add io big-endian function
authorJohn Linn <john.linn@xilinx.com>
Wed, 7 Apr 2010 09:03:15 +0000 (11:03 +0200)
committerMichal Simek <monstr@monstr.eu>
Wed, 7 Apr 2010 13:47:37 +0000 (15:47 +0200)
Add new io big-endian function. They will be used
for uartlite and spi driver.

Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/include/asm/io.h

index 32d621a56aeef7cd123f570366d719fb3472f134..e45a6eea92e0e361b88f82c88ad6373007e9e9a6 100644 (file)
@@ -108,6 +108,11 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
 #define iowrite16(v, addr)     __raw_writew((u16)(v), (u16 *)(addr))
 #define iowrite32(v, addr)     __raw_writel((u32)(v), (u32 *)(addr))
 
+#define ioread16be(addr)       __raw_readw((u16 *)(addr))
+#define ioread32be(addr)       __raw_readl((u32 *)(addr))
+#define iowrite16be(v, addr)   __raw_writew((u16)(v), (u16 *)(addr))
+#define iowrite32be(v, addr)   __raw_writel((u32)(v), (u32 *)(addr))
+
 /* These are the definitions for the x86 IO instructions
  * inb/inw/inl/outb/outw/outl, the "string" versions
  * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions