libfdt_env.h 730 B

12345678910111213141516171819202122232425262728293031
  1. #ifdef USE_HOSTCC
  2. #include "../scripts/dtc/libfdt/libfdt_env.h"
  3. #else
  4. /*
  5. * This position of the include guard is intentional.
  6. * Using the same guard name as that of scripts/dtc/libfdt/libfdt_env.h
  7. * prevents it from being included.
  8. */
  9. #ifndef LIBFDT_ENV_H
  10. #define LIBFDT_ENV_H
  11. #include <linux/string.h>
  12. #include <asm/byteorder.h>
  13. typedef __be16 fdt16_t;
  14. typedef __be32 fdt32_t;
  15. typedef __be64 fdt64_t;
  16. #define fdt32_to_cpu(x) be32_to_cpu(x)
  17. #define cpu_to_fdt32(x) cpu_to_be32(x)
  18. #define fdt64_to_cpu(x) be64_to_cpu(x)
  19. #define cpu_to_fdt64(x) cpu_to_be64(x)
  20. /* U-Boot: for strtoul in fdt_overlay.c */
  21. #include <vsprintf.h>
  22. #define strtoul(cp, endp, base) simple_strtoul(cp, endp, base)
  23. #endif /* LIBFDT_ENV_H */
  24. #endif