Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bartlomiej Sieka | 6125086 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2008 Semihalf |
Bartlomiej Sieka | 6125086 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __FDT_HOST_H__ |
| 7 | #define __FDT_HOST_H__ |
| 8 | |
| 9 | /* Make sure to include u-boot version of libfdt include files */ |
Masahiro Yamada | 75f82d0 | 2018-03-05 01:20:11 +0900 | [diff] [blame] | 10 | #include "../include/linux/libfdt.h" |
Bartlomiej Sieka | 6125086 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 11 | #include "../include/fdt_support.h" |
| 12 | |
Masahiro Yamada | 938f039 | 2018-01-21 19:19:13 +0900 | [diff] [blame] | 13 | /** |
| 14 | * fdt_remove_unused_strings() - Remove any unused strings from an FDT |
| 15 | * |
| 16 | * This creates a new device tree in @new with unused strings removed. The |
| 17 | * called can then use fdt_pack() to minimise the space consumed. |
| 18 | * |
| 19 | * @old: Old device tree blog |
| 20 | * @new: Place to put new device tree blob, which must be as large as |
| 21 | * @old |
| 22 | * @return |
| 23 | * 0, on success |
| 24 | * -FDT_ERR_BADOFFSET, corrupt device tree |
| 25 | * -FDT_ERR_NOSPACE, out of space, which should not happen unless there |
| 26 | * is something very wrong with the device tree input |
| 27 | */ |
| 28 | int fdt_remove_unused_strings(const void *old, void *new); |
| 29 | |
Simon Glass | 6a0efc8 | 2021-11-12 12:28:06 -0700 | [diff] [blame] | 30 | /** |
| 31 | * fit_check_sign() - Check a signature in a FIT |
| 32 | * |
| 33 | * @fit: FIT to check |
| 34 | * @key: Key FDT blob to check against |
| 35 | * @fit_uname_config: Name of configuration to check (NULL for default) |
| 36 | * @return 0 if OK, -ve if signature failed |
| 37 | */ |
Simon Glass | 0571232 | 2020-03-18 11:44:03 -0600 | [diff] [blame] | 38 | int fit_check_sign(const void *fit, const void *key, |
| 39 | const char *fit_uname_config); |
Heiko Schocher | d7b4232 | 2014-03-03 12:19:30 +0100 | [diff] [blame] | 40 | |
Bartlomiej Sieka | 6125086 | 2008-02-29 16:00:24 +0100 | [diff] [blame] | 41 | #endif /* __FDT_HOST_H__ */ |