[U-Boot] [PATCH 01/17] SPARC: added unaligned definitions, patch supplied by Magnus Sjalander.

Daniel Hellstrom daniel at gaisler.com
Thu Jan 28 13:16:20 CET 2010


Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
---
 include/asm-sparc/unaligned.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-sparc/unaligned.h

diff --git a/include/asm-sparc/unaligned.h b/include/asm-sparc/unaligned.h
new file mode 100644
index 0000000..4e604c1
--- /dev/null
+++ b/include/asm-sparc/unaligned.h
@@ -0,0 +1,17 @@
+#ifndef _ASM_SPARC_UNALIGNED_H
+#define _ASM_SPARC_UNALIGNED_H
+
+#ifdef __KERNEL__
+
+/*
+ * The SPARC can not do unaligned accesses, it must be split into multiple
+ * byte accesses. The SPARC is in big endian mode.
+ */
+#include <linux/unaligned/be_byteshift.h>
+#include <linux/unaligned/generic.h>
+
+#define get_unaligned	__get_unaligned_be
+#define put_unaligned	__put_unaligned_be
+
+#endif	/* __KERNEL__ */
+#endif	/* _ASM_SPARC_UNALIGNED_H */
-- 
1.5.4



More information about the U-Boot mailing list