1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2017 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
6 * Support for a 'live' (as opposed to flat) device tree
15 * of_live_build() - build a live (hierarchical) tree from a flat DT
17 * @fdt_blob: Input tree to convert
18 * @rootp: Returns live tree that was created
19 * Return: 0 if OK, -ve on error
21 int of_live_build(const void *fdt_blob, struct device_node **rootp);
24 * unflatten_device_tree() - create tree of device_nodes from flat blob
26 * Note that this allocates a single block of memory, pointed to by *mynodes.
27 * To free the tree, use free(*mynodes)
29 * unflattens a device-tree, creating the
30 * tree of struct device_node. It also fills the "name" and "type"
31 * pointers of the nodes so the normal device-tree walking functions
33 * @blob: The blob to expand
34 * @mynodes: The device_node tree created by the call
35 * Return: 0 if OK, -ve on error
37 int unflatten_device_tree(const void *blob, struct device_node **mynodes);