fdt_host.h 944 B

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