| Harvey Harrison | 6510d41 | 2008-04-29 01:03:30 -0700 | [diff] [blame] | 1 | #ifndef _ASM_SH_UNALIGNED_H | 
 | 2 | #define _ASM_SH_UNALIGNED_H | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 |  | 
| Paul Mundt | 95b781c | 2008-11-26 00:29:58 +0900 | [diff] [blame] | 4 | #ifdef CONFIG_CPU_SH4A | 
 | 5 | /* SH-4A can handle unaligned loads in a relatively neutered fashion. */ | 
 | 6 | #include <asm/unaligned-sh4a.h> | 
 | 7 | #else | 
 | 8 | /* Otherwise, SH can't handle unaligned accesses. */ | 
| Harvey Harrison | 6510d41 | 2008-04-29 01:03:30 -0700 | [diff] [blame] | 9 | #ifdef __LITTLE_ENDIAN__ | 
 | 10 | # include <linux/unaligned/le_struct.h> | 
 | 11 | # include <linux/unaligned/be_byteshift.h> | 
 | 12 | # include <linux/unaligned/generic.h> | 
 | 13 | # define get_unaligned	__get_unaligned_le | 
 | 14 | # define put_unaligned	__put_unaligned_le | 
 | 15 | #else | 
 | 16 | # include <linux/unaligned/be_struct.h> | 
 | 17 | # include <linux/unaligned/le_byteshift.h> | 
 | 18 | # include <linux/unaligned/generic.h> | 
 | 19 | # define get_unaligned	__get_unaligned_be | 
 | 20 | # define put_unaligned	__put_unaligned_be | 
 | 21 | #endif | 
| Paul Mundt | 95b781c | 2008-11-26 00:29:58 +0900 | [diff] [blame] | 22 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 |  | 
| Harvey Harrison | 6510d41 | 2008-04-29 01:03:30 -0700 | [diff] [blame] | 24 | #endif /* _ASM_SH_UNALIGNED_H */ |