blob: 06096eeac574bed06e93ea074ed03ca2c6350819 [file] [log] [blame]
Nobuhiro Iwamatsu8b25f172010-02-08 11:50:16 +09001#ifndef _ASM_SH_UNALIGNED_H
2#define _ASM_SH_UNALIGNED_H
3
4/* Copy from linux-kernel. */
5
6#ifdef CONFIG_CPU_SH4A
7/* SH-4A can handle unaligned loads in a relatively neutered fashion. */
8#include <asm/unaligned-sh4a.h>
9#else
10/* Otherwise, SH can't handle unaligned accesses. */
Masahiro Yamadae7228522014-11-26 16:00:58 +090011#include <linux/compiler.h>
Nobuhiro Iwamatsu8b25f172010-02-08 11:50:16 +090012#if defined(__BIG_ENDIAN__)
13#define get_unaligned __get_unaligned_be
14#define put_unaligned __put_unaligned_be
15#elif defined(__LITTLE_ENDIAN__)
16#define get_unaligned __get_unaligned_le
17#define put_unaligned __put_unaligned_le
18#endif
19
20#include <linux/unaligned/le_byteshift.h>
21#include <linux/unaligned/be_byteshift.h>
22#include <linux/unaligned/generic.h>
23#endif
24
25#endif /* _ASM_SH_UNALIGNED_H */