Nobuhiro Iwamatsu | 8b25f17 | 2010-02-08 11:50:16 +0900 | [diff] [blame] | 1 | #ifndef _ASM_SH_UNALIGNED_H |
| 2 | #define _ASM_SH_UNALIGNED_H |
| 3 | |
| 4 | /* Copy from linux-kernel. */ |
| 5 | |
Tom Rini | c488578 | 2021-02-10 12:51:25 -0500 | [diff] [blame] | 6 | /* Other than SH4A, SH can't handle unaligned accesses. */ |
Masahiro Yamada | e722852 | 2014-11-26 16:00:58 +0900 | [diff] [blame] | 7 | #include <linux/compiler.h> |
Nobuhiro Iwamatsu | 8b25f17 | 2010-02-08 11:50:16 +0900 | [diff] [blame] | 8 | #if defined(__BIG_ENDIAN__) |
| 9 | #define get_unaligned __get_unaligned_be |
| 10 | #define put_unaligned __put_unaligned_be |
| 11 | #elif defined(__LITTLE_ENDIAN__) |
| 12 | #define get_unaligned __get_unaligned_le |
| 13 | #define put_unaligned __put_unaligned_le |
| 14 | #endif |
| 15 | |
| 16 | #include <linux/unaligned/le_byteshift.h> |
| 17 | #include <linux/unaligned/be_byteshift.h> |
| 18 | #include <linux/unaligned/generic.h> |
Nobuhiro Iwamatsu | 8b25f17 | 2010-02-08 11:50:16 +0900 | [diff] [blame] | 19 | |
| 20 | #endif /* _ASM_SH_UNALIGNED_H */ |