fdt_host.h 977 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2008 Semihalf
  4. */
  5. #ifndef __FDT_HOST_H__
  6. #define __FDT_HOST_H__
  7. /* Make sure to include u-boot version of libfdt include files */
  8. #include "../include/linux/libfdt.h"
  9. #include "../include/fdt_support.h"
  10. /**
  11. * fdt_remove_unused_strings() - Remove any unused strings from an FDT
  12. *
  13. * This creates a new device tree in @new with unused strings removed. The
  14. * called can then use fdt_pack() to minimise the space consumed.
  15. *
  16. * @old: Old device tree blog
  17. * @new: Place to put new device tree blob, which must be as large as
  18. * @old
  19. * @return
  20. * 0, on success
  21. * -FDT_ERR_BADOFFSET, corrupt device tree
  22. * -FDT_ERR_NOSPACE, out of space, which should not happen unless there
  23. * is something very wrong with the device tree input
  24. */
  25. int fdt_remove_unused_strings(const void *old, void *new);
  26. int fit_check_sign(const void *fit, const void *key,
  27. const char *fit_uname_config);
  28. #endif /* __FDT_HOST_H__ */