util/sconfig: Get rid of struct header
commitc56ae2ffa16fe0590af015add99354cf34f68a9b
authorFurquan Shaikh <furquan@google.com>
Thu, 31 May 2018 17:33:16 +0000 (31 10:33 -0700)
committerFurquan Shaikh <furquan@google.com>
Tue, 5 Jun 2018 20:58:03 +0000 (5 20:58 +0000)
tree5e0e582bee1cb92dbbb95cd439d549ccc21a8389
parent369e1f074f7b376e815927ddfc7d8a529ba57500
util/sconfig: Get rid of struct header

Now that chips and devices are treated differently in sconfig, this
change gets rid of struct header and add_header function which were
responsible for maintaining list of headers that need to be added to
static.c.

Instead, struct chip is re-factored into struct chip and
struct chip_instance, where chip is a list of unique chips required by
the mainboard whereas chip_instance is an instance of the chip. One
chip can have multiple instances dependending upon the devices in the
system. Also, struct device is updated to hold a pointer to chip
instance instead of the chip structure. This unique list of chips is
then used to add appropriate headers to static.c

BUG=b:80081934
TEST=Verified using abuild that all boards compile successfully.

Change-Id: I6fccdf7c361b4f55a831195adcda9b21932755aa
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/26739
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
util/sconfig/main.c
util/sconfig/sconfig.h
util/sconfig/sconfig.tab.c_shipped
util/sconfig/sconfig.tab.h_shipped
util/sconfig/sconfig.y