1*0e00a84cSMasahiro Yamada #ifdef USE_HOSTCC 2*0e00a84cSMasahiro Yamada #include "../scripts/dtc/libfdt/libfdt_env.h" 3*0e00a84cSMasahiro Yamada #else 4*0e00a84cSMasahiro Yamada /* 5*0e00a84cSMasahiro Yamada * This position of the include guard is intentional. 6*0e00a84cSMasahiro Yamada * Using the same guard name as that of scripts/dtc/libfdt/libfdt_env.h 7*0e00a84cSMasahiro Yamada * prevents it from being included. 8*0e00a84cSMasahiro Yamada */ 95d099091SMasahiro Yamada #ifndef _LIBFDT_ENV_H 105d099091SMasahiro Yamada #define _LIBFDT_ENV_H 115d099091SMasahiro Yamada 125d099091SMasahiro Yamada #include <linux/string.h> 135d099091SMasahiro Yamada 145d099091SMasahiro Yamada #include <asm/byteorder.h> 155d099091SMasahiro Yamada 165d099091SMasahiro Yamada typedef __be16 fdt16_t; 175d099091SMasahiro Yamada typedef __be32 fdt32_t; 185d099091SMasahiro Yamada typedef __be64 fdt64_t; 195d099091SMasahiro Yamada 205d099091SMasahiro Yamada #define fdt32_to_cpu(x) be32_to_cpu(x) 215d099091SMasahiro Yamada #define cpu_to_fdt32(x) cpu_to_be32(x) 225d099091SMasahiro Yamada #define fdt64_to_cpu(x) be64_to_cpu(x) 235d099091SMasahiro Yamada #define cpu_to_fdt64(x) cpu_to_be64(x) 245d099091SMasahiro Yamada 255d099091SMasahiro Yamada /* U-Boot: for strtoul in fdt_overlay.c */ 265d099091SMasahiro Yamada #include <vsprintf.h> 275d099091SMasahiro Yamada 285d099091SMasahiro Yamada #define strtoul(cp, endp, base) simple_strtoul(cp, endp, base) 295d099091SMasahiro Yamada 305d099091SMasahiro Yamada #endif /* _LIBFDT_ENV_H */ 31*0e00a84cSMasahiro Yamada #endif 32