Patchwork [U-Boot] microblaze: Fix unaligned.h for endians

login
register
mail settings
Submitter Michal Simek
Date Feb. 28, 2011, 9:27 a.m.
Message ID <1298885229-26247-1-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/84751/
State Changes Requested
Headers show

Comments

Michal Simek - Feb. 28, 2011, 9:27 a.m.
Based on ARM unaligned.h.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/include/asm/unaligned.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

Patch

diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h
index 785c2e9..faf1b02 100644
--- a/arch/microblaze/include/asm/unaligned.h
+++ b/arch/microblaze/include/asm/unaligned.h
@@ -1,16 +1,16 @@ 
 #ifndef _ASM_MICROBLAZE_UNALIGNED_H
 #define _ASM_MICROBLAZE_UNALIGNED_H
 
-#ifdef __KERNEL__
-
-/*
- * The Microblaze can do unaligned accesses itself in big endian mode.
- */
-#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
 #include <linux/unaligned/generic.h>
 
-#define get_unaligned	__get_unaligned_be
-#define put_unaligned	__put_unaligned_be
+#ifdef __MICROBLAZEEL__
+# define get_unaligned	__get_unaligned_le
+# define put_unaligned	__put_unaligned_le
+#else
+# define get_unaligned	__get_unaligned_be
+# define put_unaligned	__put_unaligned_be
+#endif
 
-#endif	/* __KERNEL__ */
 #endif	/* _ASM_MICROBLAZE_UNALIGNED_H */