[U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
Thomas Chou
thomas at wytron.com.tw
Mon Mar 1 08:28:25 CET 2010
Signed-off-by: Thomas Chou <thomas at wytron.com.tw>
---
include/asm-nios2/unaligned.h | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 include/asm-nios2/unaligned.h
diff --git a/include/asm-nios2/unaligned.h b/include/asm-nios2/unaligned.h
new file mode 100644
index 0000000..483dd04
--- /dev/null
+++ b/include/asm-nios2/unaligned.h
@@ -0,0 +1,19 @@
+#ifndef _ASM_NIOS2_UNALIGNED_H
+#define _ASM_NIOS2_UNALIGNED_H
+
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
+#include <linux/unaligned/generic.h>
+
+/*
+ * Select endianness
+ */
+#ifndef __NIOS2EB__
+#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 /* _ASM_NIOS2_UNALIGNED_H */
--
1.6.6.1
More information about the U-Boot
mailing list