public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c
@ 2010-03-01  7:28 Thomas Chou
  2010-03-05 11:40 ` Mike Frysinger
  2010-03-16 16:24 ` Scott McNutt
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Chou @ 2010-03-01  7:28 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Thomas Chou <thomas@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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-16 16:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01  7:28 [U-Boot] [PATCH] nios2: add unaligned.h to be included by zlib.c Thomas Chou
2010-03-05 11:40 ` Mike Frysinger
2010-03-07  3:42   ` Thomas Chou
2010-03-16 16:24 ` Scott McNutt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox