xref: /rk3399_rockchip-uboot/arch/sandbox/include/asm/byteorder.h (revision 744d9859a71c515118457fecb7a58674b600e81a)
1*744d9859SSimon Glass /*
2*744d9859SSimon Glass  * Copyright (c) 2011 The Chromium OS Authors.
3*744d9859SSimon Glass  *
4*744d9859SSimon Glass  * See file CREDITS for list of people who contributed to this
5*744d9859SSimon Glass  * project.
6*744d9859SSimon Glass  *
7*744d9859SSimon Glass  * This program is free software; you can redistribute it and/or
8*744d9859SSimon Glass  * modify it under the terms of the GNU General Public License as
9*744d9859SSimon Glass  * published by the Free Software Foundation; either version 2 of
10*744d9859SSimon Glass  * the License, or (at your option) any later version.
11*744d9859SSimon Glass  *
12*744d9859SSimon Glass  * This program is distributed in the hope that it will be useful,
13*744d9859SSimon Glass  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14*744d9859SSimon Glass  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
15*744d9859SSimon Glass  * GNU General Public License for more details.
16*744d9859SSimon Glass  *
17*744d9859SSimon Glass  * You should have received a copy of the GNU General Public License
18*744d9859SSimon Glass  * along with this program; if not, write to the Free Software
19*744d9859SSimon Glass  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20*744d9859SSimon Glass  * MA 02111-1307 USA
21*744d9859SSimon Glass  */
22*744d9859SSimon Glass 
23*744d9859SSimon Glass #ifndef __ASM_SANDBOX_BYTEORDER_H
24*744d9859SSimon Glass #define __ASM_SANDBOX_BYTEORDER_H
25*744d9859SSimon Glass 
26*744d9859SSimon Glass 
27*744d9859SSimon Glass #include <asm/types.h>
28*744d9859SSimon Glass 
29*744d9859SSimon Glass #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
30*744d9859SSimon Glass #  define __BYTEORDER_HAS_U64__
31*744d9859SSimon Glass #  define __SWAB_64_THRU_32__
32*744d9859SSimon Glass #endif
33*744d9859SSimon Glass 
34*744d9859SSimon Glass #ifdef CONFIG_SANDBOX_BIG_ENDIAN
35*744d9859SSimon Glass #include <linux/byteorder/big_endian.h>
36*744d9859SSimon Glass #else
37*744d9859SSimon Glass #include <linux/byteorder/little_endian.h>
38*744d9859SSimon Glass #endif
39*744d9859SSimon Glass 
40*744d9859SSimon Glass #endif
41