diff options
author | Hung-Te Lin <hungte@chromium.org> | 2018-09-10 10:51:26 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-09-16 08:37:36 +0000 |
commit | 936dbe1d064b24bb5f38889d50795e68a2309e62 (patch) | |
tree | a36e952beca9a575d9272fd0c2dce1f084d9db7e /util/sconfig/sconfig.y | |
parent | c1dc7932b5ad3fe1f7a67f167b202c9019714466 (diff) | |
download | coreboot-936dbe1d064b24bb5f38889d50795e68a2309e62.tar.xz |
sconfig: Allow setting device status in device tree
For devices supporting both Linux and Windows, we may find some ACPI
devices that only need drivers in Linux and should not even be shown in
Windows Device Manager UI.
The new 'hidden' keyword in device tree 'device' statement allows
devices sharing same driver to call acpi_gen_writeSTA with different
values.
BUG=b:72200466
BRANCH=eve
TEST=Builds and boots properly on device eve
Change-Id: Iae881a294b122d3a581b456285d2992ab637fb8e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/28566
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'util/sconfig/sconfig.y')
-rwxr-xr-x | util/sconfig/sconfig.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y index 3e463059c8..3a6e9ab8a3 100755 --- a/util/sconfig/sconfig.y +++ b/util/sconfig/sconfig.y @@ -31,7 +31,7 @@ static struct chip_instance *cur_chip_instance; int number; } -%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 +%token CHIP DEVICE REGISTER BOOL HIDDEN 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 = root_parent; } chip; @@ -48,7 +48,7 @@ chip: CHIP STRING /* == path */ { cur_chip_instance = chip_dequeue_tail(); }; -device: DEVICE BUS NUMBER /* == devnum */ BOOL { +device: DEVICE BUS NUMBER /* == devnum */ status { $<dev>$ = new_device(cur_parent, cur_chip_instance, $<number>2, $<string>3, $<number>4); cur_parent = $<dev>$->last_bus; } @@ -56,6 +56,8 @@ device: DEVICE BUS NUMBER /* == devnum */ BOOL { cur_parent = $<dev>5->parent; }; +status: BOOL | HIDDEN; + resource: RESOURCE NUMBER /* == resnum */ EQUALS NUMBER /* == resval */ { add_resource(cur_parent, $<number>1, strtol($<string>2, NULL, 0), strtol($<string>4, NULL, 0)); } ; |