diff options
author | Wolfgang Denk <wd@denx.de> | 2010-03-04 21:11:55 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-03-04 21:11:55 +0100 |
commit | a43af0f2236471bfe26e397c44c989506b115dfe (patch) | |
tree | 483b9163c01a9173de83fdefedf5582cc8748838 /include/asm-sh/unaligned.h | |
parent | fafe2a9e23cb03d4a55027a172aadffa08977d18 (diff) | |
parent | da5e083590bb62ca6d7f08d3714d07ba736da863 (diff) | |
download | u-boot-imx-a43af0f2236471bfe26e397c44c989506b115dfe.zip u-boot-imx-a43af0f2236471bfe26e397c44c989506b115dfe.tar.gz u-boot-imx-a43af0f2236471bfe26e397c44c989506b115dfe.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-sh
Diffstat (limited to 'include/asm-sh/unaligned.h')
-rw-r--r-- | include/asm-sh/unaligned.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/asm-sh/unaligned.h b/include/asm-sh/unaligned.h new file mode 100644 index 0000000..2e0d164 --- /dev/null +++ b/include/asm-sh/unaligned.h @@ -0,0 +1,25 @@ +#ifndef _ASM_SH_UNALIGNED_H +#define _ASM_SH_UNALIGNED_H + +/* Copy from linux-kernel. */ + +#ifdef CONFIG_CPU_SH4A +/* SH-4A can handle unaligned loads in a relatively neutered fashion. */ +#include <asm/unaligned-sh4a.h> +#else +/* Otherwise, SH can't handle unaligned accesses. */ +#include <compiler.h> +#if defined(__BIG_ENDIAN__) +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be +#elif defined(__LITTLE_ENDIAN__) +#define get_unaligned __get_unaligned_le +#define put_unaligned __put_unaligned_le +#endif + +#include <linux/unaligned/le_byteshift.h> +#include <linux/unaligned/be_byteshift.h> +#include <linux/unaligned/generic.h> +#endif + +#endif /* _ASM_SH_UNALIGNED_H */ |