summaryrefslogtreecommitdiffstats
path: root/arch/ppc/include
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2012-08-29 18:13:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-04 08:55:29 +0200
commit0f9ca850a5a74c7ef5959e11919b399fc2322984 (patch)
tree1382fa9bb20507ad40851612c201ccc52783c9d7 /arch/ppc/include
parent3f96b4938c4046590be8a38fb114148c4bf1ca8e (diff)
downloadbarebox-0f9ca850a5a74c7ef5959e11919b399fc2322984.tar.gz
barebox-0f9ca850a5a74c7ef5959e11919b399fc2322984.tar.xz
ppc: add unaligned support
This file is copied from Linux 2.6.39. It is added so that the P2020RDB can still build. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/include')
-rw-r--r--arch/ppc/include/asm/unaligned.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/ppc/include/asm/unaligned.h b/arch/ppc/include/asm/unaligned.h
new file mode 100644
index 0000000000..a41fa8cb4a
--- /dev/null
+++ b/arch/ppc/include/asm/unaligned.h
@@ -0,0 +1,16 @@
+#ifndef _ASM_PPC_UNALIGNED_H
+#define _ASM_PPC_UNALIGNED_H
+
+#ifdef __KERNEL__
+
+/*
+ * The PowerPC 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_PPC_UNALIGNED_H */