[PATCH 01/10] ARM: add support of in_be16/32 and out_be16/32

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Apr 23 03:02:10 EDT 2012


This will allow to have cfi flash on big endian SoC as IXP4xx.

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

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index e0630eb..644378c 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -10,4 +10,9 @@ extern void memcpy_fromio(void *, const volatile void __iomem *, size_t);
 extern void memcpy_toio(volatile void __iomem *, const void *, size_t);
 extern void memset_io(volatile void __iomem *, int, size_t);
 
+#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_ARM_IO_H */
-- 
1.7.9.1




More information about the barebox mailing list