]> Pileus Git - ~andy/linux/commitdiff
alpha: add io{read,write}{16,32}be functions
authorMichael Cree <mcree@orcon.net.nz>
Wed, 30 Nov 2011 13:01:40 +0000 (08:01 -0500)
committerMatt Turner <mattst88@gmail.com>
Thu, 24 May 2012 18:27:59 +0000 (14:27 -0400)
These functions are used in some PCI drivers with big-endian
MMIO space.

Admittedly it is almost certain that no one this side of the
Moon would use such a card in an Alpha but it does get us
closer to being able to build allyesconfig or allmodconfig,
and it enables the Debian default generic config to build.

Tested-by: Raúl Porcel <armin76@gentoo.org>
Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/include/asm/io.h

index 7a3d38d5ed6bb197b15048d49dc83fba5c7c9a76..5ebab5895edb7991e660104d8288514d77fdf2c3 100644 (file)
@@ -489,6 +489,11 @@ extern inline void writeq(u64 b, volatile void __iomem *addr)
 }
 #endif
 
+#define ioread16be(p) be16_to_cpu(ioread16(p))
+#define ioread32be(p) be32_to_cpu(ioread32(p))
+#define iowrite16be(v,p) iowrite16(cpu_to_be16(v), (p))
+#define iowrite32be(v,p) iowrite32(cpu_to_be32(v), (p))
+
 #define inb_p          inb
 #define inw_p          inw
 #define inl_p          inl