Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 Semihalf |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __FDT_HOST_H__ |
| 8 | #define __FDT_HOST_H__ |
| 9 | |
| 10 | /* Make sure to include u-boot version of libfdt include files */ |
Masahiro Yamada | b08c8c4 | 2018-03-05 01:20:11 +0900 | [diff] [blame] | 11 | #include "../include/linux/libfdt.h" |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 12 | #include "../include/fdt_support.h" |
| 13 | |
Masahiro Yamada | ae9ace7 | 2018-01-21 19:19:13 +0900 | [diff] [blame] | 14 | /** |
| 15 | * fdt_remove_unused_strings() - Remove any unused strings from an FDT |
| 16 | * |
| 17 | * This creates a new device tree in @new with unused strings removed. The |
| 18 | * called can then use fdt_pack() to minimise the space consumed. |
| 19 | * |
| 20 | * @old: Old device tree blog |
| 21 | * @new: Place to put new device tree blob, which must be as large as |
| 22 | * @old |
| 23 | * @return |
| 24 | * 0, on success |
| 25 | * -FDT_ERR_BADOFFSET, corrupt device tree |
| 26 | * -FDT_ERR_NOSPACE, out of space, which should not happen unless there |
| 27 | * is something very wrong with the device tree input |
| 28 | */ |
| 29 | int fdt_remove_unused_strings(const void *old, void *new); |
| 30 | |
Heiko Schocher | 29a23f9 | 2014-03-03 12:19:30 +0100 | [diff] [blame] | 31 | int fit_check_sign(const void *working_fdt, const void *key); |
| 32 | |
Bartlomiej Sieka | 8cf3080 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 33 | #endif /* __FDT_HOST_H__ */ |