diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-18 20:08:55 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-01 07:03:06 -0600 |
commit | 8b50d526ea5b1e74934cddf6f1ee830a72401b79 (patch) | |
tree | 3ce364b7b812bcaad7a334761089e1e52b107c21 /include/of_live.h | |
parent | 644ec0a933ef5c4f8e82b9fd8df9439386d0444d (diff) |
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>
Diffstat (limited to 'include/of_live.h')
-rw-r--r-- | include/of_live.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/of_live.h b/include/of_live.h new file mode 100644 index 0000000000..f5303bb018 --- /dev/null +++ b/include/of_live.h @@ -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 |