diff options
author | Furquan Shaikh <furquan@google.com> | 2018-06-22 09:19:15 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2018-06-25 17:40:36 +0000 |
commit | 27efc501d179c34e5602e3c691cb9b6d52474d86 (patch) | |
tree | 102138bd6b467294f2760e31f012f25eecae8f9c /.clang-format | |
parent | f2419983523e577688318dea523f6cb9ffb3d9b8 (diff) |
util/sconfig: Add support for overriding base tree properties/node
This change adds support to allow variants to override the devices and
properties in base device tree by providing an override device
tree. It works as follows:
1. Both base and override device trees are parsed from provided input
files.
2. Walk through the trees in lockstep fashion using depth-first
traversal checking if a node in override tree has a matching node in
base tree.
- If matching node is found, then update the properties of base node
using the override node. Continue walking the children of the nodes.
- If matching node is not found, then copy the entire override
subtree of the node under the current base parent. In addition to
that, chip instance pointers of the nodes in override tree need to be
updated if they were pointing to the override parents chip instance.
Since chip always expects a device to be present, it leads to a
side-effect that overriding chip registers requires that a device is
always provided for the chip in the override tree as well.
BUG=b:80081934
Change-Id: I6604e4f8abe3fc48240e942fea32da96031e1e46
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27206
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions