summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKrzysztof Halasa <khc@pm.waw.pl>2012-05-05 23:34:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-07 09:50:29 +0200
commitbe57f20cdd7ddb31936519d97d68590c43b1f3ad (patch)
tree10f8655ea2fcd5047c4a316606adfdf2f3b243be /include
parent14ec1f6d4b8a7457e4ec6feba25c748126cd6e5b (diff)
downloadbarebox-be57f20cdd7ddb31936519d97d68590c43b1f3ad.tar.gz
barebox-be57f20cdd7ddb31936519d97d68590c43b1f3ad.tar.xz
Fix big endian MMIO primitives.
cpu_read*() and cpu_wrire*() are precisely equal to __raw_read*() and __raw_write*(). Striving for correctness we can replace all those __raw_*() with cpu_*() as that's exactly what the former ones do. Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/io.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/include/io.h b/include/io.h
index 39b5e614b..8d885de68 100644
--- a/include/io.h
+++ b/include/io.h
@@ -4,20 +4,11 @@
#include <asm/io.h>
/* cpu_read/cpu_write: cpu native io accessors */
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define cpu_readb(a) readb(a)
-#define cpu_readw(a) in_be16(a)
-#define cpu_readl(a) in_be32(a)
-#define cpu_writeb(v, a) writeb((v), (a))
-#define cpu_writew(v, a) out_be16((a), (v))
-#define cpu_writel(v, a) out_be32((a), (v))
-#else
-#define cpu_readb(a) readb(a)
-#define cpu_readw(a) readw(a)
-#define cpu_readl(a) readl(a)
-#define cpu_writeb(v, a) writeb((v), (a))
-#define cpu_writew(v, a) writew((v), (a))
-#define cpu_writel(v, a) writel((v), (a))
-#endif
+#define cpu_readb(a) __raw_readb(a)
+#define cpu_readw(a) __raw_readw(a)
+#define cpu_readl(a) __raw_readl(a)
+#define cpu_writeb(v, a) __raw_writeb((v), (a))
+#define cpu_writew(v, a) __raw_writew((v), (a))
+#define cpu_writel(v, a) __raw_writel((v), (a))
#endif /* __IO_H */