[U-Boot] [PATCH 2/2] microblaze: zlib needs asm/unaligned.h

monstr at monstr.eu monstr at monstr.eu
Tue Jan 19 12:03:25 CET 2010


From: Michal Simek <monstr at monstr.eu>

Microblaze has own hw unaligned handler if is available.
Use big endian version.

Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 include/asm-microblaze/unaligned.h |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-microblaze/unaligned.h

diff --git a/include/asm-microblaze/unaligned.h b/include/asm-microblaze/unaligned.h
new file mode 100644
index 0000000..785c2e9
--- /dev/null
+++ b/include/asm-microblaze/unaligned.h
@@ -0,0 +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/generic.h>
+
+#define get_unaligned	__get_unaligned_be
+#define put_unaligned	__put_unaligned_be
+
+#endif	/* __KERNEL__ */
+#endif	/* _ASM_MICROBLAZE_UNALIGNED_H */
-- 
1.5.5.1



More information about the U-Boot mailing list