m68k:correct io macros about endian
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.
Signed-off-by Chao Fu <[email protected]>
--- arch/m68k/include/asm/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/m68k/include/asm/io.h +4 -4
@@ -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
Quoted 5 lines · Chao Fu
From: Chao Fu <[email protected]>
M68k is big endian cpu ,so use
be_outandbe_inin big endian.Signed-off-by Chao Fu <[email protected]>
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>