1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: Add a function to create a 'live' device tree

This function converts the flat device tree into a hierarchical one with
C structures and pointers. This is easier to access.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2017-05-18 20:08:55 -06:00
parent 644ec0a933
commit 8b50d526ea
3 changed files with 358 additions and 0 deletions

24
include/of_live.h Normal file
View File

@@ -0,0 +1,24 @@
/*
* Copyright (c) 2017 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
*
* SPDX-License-Identifier: GPL-2.0+
*
* Support for a 'live' (as opposed to flat) device tree
*/
#ifndef _OF_LIVE_H
#define _OF_LIVE_H
struct device_node;
/**
* of_live_build() - build a live (hierarchical) tree from a flat DT
*
* @fdt_blob: Input tree to convert
* @rootp: Returns live tree that was created
* @return 0 if OK, -ve on error
*/
int of_live_build(const void *fdt_blob, struct device_node **rootp);
#endif