[U-Boot] [PATCH 01/17] SPARC: added unaligned definitions, patch supplied by Magnus Sjalander.

Mike Frysinger vapier at gentoo.org
Thu Jan 28 21:41:44 CET 2010


On Thursday 28 January 2010 07:16:20 Daniel Hellstrom wrote:
> Signed-off-by: Daniel Hellstrom <daniel at gaisler.com>
> ---
>  include/asm-sparc/unaligned.h |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
>  create mode 100644 include/asm-sparc/unaligned.h
> 
> diff --git a/include/asm-sparc/unaligned.h b/include/asm-sparc/unaligned.h
> new file mode 100644
> index 0000000..4e604c1
> --- /dev/null
> +++ b/include/asm-sparc/unaligned.h
> @@ -0,0 +1,17 @@
> +#ifndef _ASM_SPARC_UNALIGNED_H
> +#define _ASM_SPARC_UNALIGNED_H
> +
> +#ifdef __KERNEL__
> +
> +/*
> + * The SPARC can not do unaligned accesses, it must be split into multiple
> + * byte accesses. The SPARC is in big endian mode.
> + */
> +#include <linux/unaligned/be_byteshift.h>
> +#include <linux/unaligned/generic.h>
> +
> +#define get_unaligned	__get_unaligned_be
> +#define put_unaligned	__put_unaligned_be
> +
> +#endif	/* __KERNEL__ */
> +#endif	/* _ASM_SPARC_UNALIGNED_H */

there is a proposed asm-generic/unaligned.h on the mailing list which i think 
you could use.  you'd just need:
#include <asm-generic/unaligned.h>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100128/329f0c76/attachment.pgp 


More information about the U-Boot mailing list