coreboot-kgpe-d16/util/sconfig
Furquan Shaikh 79e8412665 util/sconfig: Re-factor sconfig to not assume chip as device
This change adds a new structure "struct chip" to identify elements of
type chip rather than re-using the structure for device. Until now
chip was treated as a device while generating the parse tree and then
device tree postprocessing skipped over all the chip entries in
children and sibling pointers of device nodes.

With this change, the device tree will only contain struct device in
the parsed tree. It helps by avoiding unnecessary pointers to chip
structure as children or next_sibling and then skipping those elements
in post processing. Every device can then hold a pointer to its chip.

When generating static.c, chip structure is emitted before device
structure to ensure that the device structure has chip within its
scope. Externally, the only visible change in static.c should be the
order in which chip/device elements are emitted i.e. previously all
chips under a particular device were emitted to static.c and then the
devices using those chips. Now, all chips are emitted before all the
devices in static.c

BUG=b:80081934
TEST=Verified that abuild is successful for all boards. Also, verified
that static.c generated for eve, kahlee, scarlet, asrock imb_a180 is
unchanged from before in node definitions.

Change-Id: I255092f527c8eecb144385eb681df20e54caf8f5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/26720
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-06-05 20:57:16 +00:00
..
Makefile.inc util/blobtool & sconfig: Update GENPARSER Kconfig question 2017-04-14 17:26:48 +02:00
lex.yy.c_shipped devicetree: Add USB device type 2018-05-11 08:59:51 +00:00
main.c util/sconfig: Re-factor sconfig to not assume chip as device 2018-06-05 20:57:16 +00:00
sconfig.h util/sconfig: Re-factor sconfig to not assume chip as device 2018-06-05 20:57:16 +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 sconfig to not assume chip as device 2018-06-05 20:57:16 +00:00
sconfig.tab.h_shipped util/sconfig: Re-factor sconfig to not assume chip as device 2018-06-05 20:57:16 +00:00
sconfig.y util/sconfig: Re-factor sconfig to not assume chip as device 2018-06-05 20:57:16 +00:00