summaryrefslogtreecommitdiff
path: root/util/sconfig/sconfig.y
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-05-31 07:52:00 -0700
committerFurquan Shaikh <furquan@google.com>2018-06-05 20:57:39 +0000
commita9b642999bb8b0bb409150edc7adc777794ffe75 (patch)
treec98a74dea79c538bcb2d26e459d9a069643dc428 /util/sconfig/sconfig.y
parenta0cc5a697ce13dece6833dca41913fe5c467d3d3 (diff)
downloadcoreboot-a9b642999bb8b0bb409150edc7adc777794ffe75.tar.xz
util/sconfig: Get rid of bus pointer in device structure
The only reason bus pointer existed in device structure in sconfig was to allow a node to point to the parent which could be a chip and bus which is the true parent in device tree hierarchy. Now that chip is no longer a device, there is no need for separate bus and parent pointers. This change gets rid of the redundant bus pointer in struct device in sconfig. BUG=b:80081934 TEST=Verified that static.c generated for all boards built by abuild is same with and without this change. Change-Id: I21f8fe1545a9ed53d66d6d4462df4a5d63023844 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/26736 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/sconfig/sconfig.y')
-rwxr-xr-xutil/sconfig/sconfig.y8
1 files changed, 3 insertions, 5 deletions
diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y
index 671b43551e..c289c9e26d 100755
--- a/util/sconfig/sconfig.y
+++ b/util/sconfig/sconfig.y
@@ -20,7 +20,7 @@
int yylex();
void yyerror(const char *s);
-static struct device *cur_parent, *cur_bus;
+static struct device *cur_parent;
static struct chip *cur_chip;
%}
@@ -33,7 +33,7 @@ static struct chip *cur_chip;
%token CHIP DEVICE REGISTER BOOL BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC CPU_CLUSTER CPU DOMAIN IRQ DRQ IO NUMBER SUBSYSTEMID INHERIT IOAPIC_IRQ IOAPIC PCIINT GENERIC SPI USB MMIO
%%
-devtree: { cur_parent = cur_bus = head; } chip { postprocess_devtree(); } ;
+devtree: { cur_parent = head; } chip { postprocess_devtree(); } ;
chipchildren: chipchildren device | chipchildren chip | chipchildren registers | /* empty */ ;
@@ -49,13 +49,11 @@ chip: CHIP STRING /* == path */ {
};
device: DEVICE BUS NUMBER /* == devnum */ BOOL {
- $<device>$ = new_device(cur_parent, cur_bus, cur_chip, $<number>2, $<string>3, $<number>4);
+ $<device>$ = new_device(cur_parent, cur_chip, $<number>2, $<string>3, $<number>4);
cur_parent = $<device>$;
- cur_bus = $<device>$;
}
devicechildren END {
cur_parent = $<device>5->parent;
- cur_bus = $<device>5->bus;
fold_in($<device>5);
alias_siblings($<device>5->children);
};