[PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Apr 30 08:00:05 EDT 2012


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/mips/include/asm/io.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 5e12860..4100e1e 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -71,4 +71,9 @@ static inline void __raw_writel(u32 b, volatile void __iomem *addr)
 #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr)
 #define writel(b,addr) __raw_writel(__cpu_to_le32(b),addr)
 
+#define in_be16(a)	__be16_to_cpu(__raw_readw(a))
+#define in_be32(a)	__be32_to_cpu(__raw_readl(a))
+#define out_be16(a, v)	__raw_writew(__cpu_to_be16(v), a)
+#define out_be32(a, v)	__raw_writel(__cpu_to_be32(v), a)
+
 #endif	/* __ASM_MIPS_IO_H */
-- 
1.7.9.1




More information about the barebox mailing list