coreboot-kgpe-d16/util/sconfig
Furquan Shaikh 27efc501d1 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>
2018-06-25 17:40:36 +00:00
..
Makefile.inc
lex.yy.c_shipped devicetree: Add USB device type 2018-05-11 08:59:51 +00:00
main.c util/sconfig: Add support for overriding base tree properties/node 2018-06-25 17:40:36 +00:00
sconfig.h util/sconfig: Add support for overriding base tree properties/node 2018-06-25 17:40:36 +00:00
sconfig.l devicetree: Add USB device type 2018-05-11 08:59:51 +00:00
sconfig.tab.c_shipped util/sconfig: Re-factor device structure in parse tree 2018-06-08 23:36:02 +00:00
sconfig.tab.h_shipped util/sconfig: Re-factor device structure in parse tree 2018-06-08 23:36:02 +00:00
sconfig.y util/sconfig: Re-factor device structure in parse tree 2018-06-08 23:36:02 +00:00