Skip to contentSkip to conversation

m68k:correct io macros about endian

PATCH In review Chao Fu 2 participants 2 messages Dec 13, 2013 – Jun 19, 2014 m68k architecture

lore
Share & tools
lore

Chao Fu

author
#0 lore raw

PATCH 1/1 m68k:correct io macros about endian

From: Chao Fu <[email protected]>

M68k is big endian cpu ,so use be_out and be_in in big endian.

---
 arch/m68k/include/asm/io.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/m68k/include/asm/io.h +4 -4
index 5a87a9b..2d2a519 100644
@@ -32,10 +32,10 @@
 #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
 
 /*
Signature · 1 line
1.8.4
#1 lore raw
Quoted 5 lines · Chao Fu

From: Chao Fu <[email protected]>

M68k is big endian cpu ,so use be_out and be_in in big endian.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140619/a0e8409e/attachment.pgp>