2008-12-16 13:43:48 +03:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License, version 2, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-07-17 00:47:01 +04:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2008-12-16 13:43:48 +03:00
|
|
|
*
|
|
|
|
* Copyright IBM Corp. 2008
|
|
|
|
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _LIBFDT_ENV_H
|
|
|
|
#define _LIBFDT_ENV_H
|
|
|
|
|
2012-12-17 21:20:00 +04:00
|
|
|
#include "qemu/bswap.h"
|
2008-12-16 13:43:48 +03:00
|
|
|
|
2011-05-28 17:45:18 +04:00
|
|
|
#ifdef HOST_WORDS_BIGENDIAN
|
2013-01-05 04:39:26 +04:00
|
|
|
#define fdt32_to_cpu(x) (x)
|
|
|
|
#define cpu_to_fdt32(x) (x)
|
|
|
|
#define fdt64_to_cpu(x) (x)
|
|
|
|
#define cpu_to_fdt64(x) (x)
|
2008-12-16 13:43:48 +03:00
|
|
|
#else
|
2013-01-05 04:39:26 +04:00
|
|
|
#define fdt32_to_cpu(x) bswap32(x)
|
|
|
|
#define cpu_to_fdt32(x) bswap32(x)
|
|
|
|
#define fdt64_to_cpu(x) bswap64(x)
|
|
|
|
#define cpu_to_fdt64(x) bswap64(x)
|
2008-12-16 13:43:48 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _LIBFDT_ENV_H */
|