blob: 99b009b2210928717d6f2a6183e61f247a25a6d7 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Bartlomiej Sieka8cf30802008-02-29 16:00:24 +01002/*
3 * (C) Copyright 2008 Semihalf
Bartlomiej Sieka8cf30802008-02-29 16:00:24 +01004 */
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 Yamadab08c8c42018-03-05 01:20:11 +090010#include "../include/linux/libfdt.h"
Bartlomiej Sieka8cf30802008-02-29 16:00:24 +010011#include "../include/fdt_support.h"
12
Masahiro Yamadaae9ace72018-01-21 19:19:13 +090013/**
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 */
28int fdt_remove_unused_strings(const void *old, void *new);
29
Heiko Schocher29a23f92014-03-03 12:19:30 +010030int fit_check_sign(const void *working_fdt, const void *key);
31
Bartlomiej Sieka8cf30802008-02-29 16:00:24 +010032#endif /* __FDT_HOST_H__ */