]> git.sur5r.net Git - u-boot/commitdiff
m68k:correct io macros about endian
authorChao Fu <B44548@freescale.com>
Fri, 13 Dec 2013 05:39:07 +0000 (13:39 +0800)
committerTom Rini <trini@ti.com>
Thu, 19 Jun 2014 15:18:42 +0000 (11:18 -0400)
M68k is big endian cpu ,so use be_out and be_in in big endian.

Signed-off-by: Chao Fu <b44548@freescale.com>
arch/m68k/include/asm/io.h

index 5a87a9b810d06ce8eb4a9ec60f10376ab79792f6..2d2a51901b88d0e7eef16d3a07a194cebb67d98f 100644 (file)
 #define writew(b,addr)         ((*(volatile u16 *) (addr)) = (b))
 #define writel(b,addr)         ((*(volatile u32 *) (addr)) = (b))
 #else
-#define readw(addr)            in_le16((volatile u16 *)(addr))
-#define readl(addr)            in_le32((volatile u32 *)(addr))
-#define writew(b,addr)         out_le16((volatile u16 *)(addr),(b))
-#define writel(b,addr)         out_le32((volatile u32 *)(addr),(b))
+#define readw(addr)            in_be16((volatile u16 *)(addr))
+#define readl(addr)            in_be32((volatile u32 *)(addr))
+#define writew(b,addr)         out_be16((volatile u16 *)(addr),(b))
+#define writel(b,addr)         out_be32((volatile u32 *)(addr),(b))
 #endif
 
 /*