[U-Boot] [PATCH] microblaze: Fix unaligned.h for endians
Michal Simek
monstr at monstr.eu
Mon Feb 28 10:27:06 CET 2011
Based on ARM unaligned.h.
Signed-off-by: Michal Simek <monstr at monstr.eu>
---
arch/microblaze/include/asm/unaligned.h | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
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 */
--
1.5.5.6
More information about the U-Boot
mailing list