blob: 8e7ed046bfedbc638adf27432f3edb539f0afe57 [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
Chris Zankel9a8fd552005-06-23 22:01:26 -07002 * Xtensa doesn't handle unaligned accesses efficiently.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
Harvey Harrison6510d412008-04-29 01:03:30 -070010#ifndef _ASM_XTENSA_UNALIGNED_H
11#define _ASM_XTENSA_UNALIGNED_H
Chris Zankel9a8fd552005-06-23 22:01:26 -070012
Harvey Harrison91a15022008-11-09 18:51:09 -080013#include <asm/byteorder.h>
14
15#ifdef __LITTLE_ENDIAN
16# include <linux/unaligned/le_struct.h>
Harvey Harrison6510d412008-04-29 01:03:30 -070017# include <linux/unaligned/be_byteshift.h>
18# include <linux/unaligned/generic.h>
19# define get_unaligned __get_unaligned_le
20# define put_unaligned __put_unaligned_le
Harvey Harrison91a15022008-11-09 18:51:09 -080021#else
22# include <linux/unaligned/be_struct.h>
Harvey Harrison6510d412008-04-29 01:03:30 -070023# include <linux/unaligned/le_byteshift.h>
24# include <linux/unaligned/generic.h>
25# define get_unaligned __get_unaligned_be
26# define put_unaligned __put_unaligned_be
Harvey Harrison6510d412008-04-29 01:03:30 -070027#endif
Chris Zankel9a8fd552005-06-23 22:01:26 -070028
Harvey Harrison6510d412008-04-29 01:03:30 -070029#endif /* _ASM_XTENSA_UNALIGNED_H */