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>
This commit is contained in:
committed by
Patrick Georgi
parent
c1dc7932b5
commit
936dbe1d06
@@ -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)); } ;
|
||||
|
||||
|
Reference in New Issue
Block a user