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:
Hung-Te Lin
2018-09-10 10:51:26 +08:00
committed by Patrick Georgi
parent c1dc7932b5
commit 936dbe1d06
8 changed files with 255 additions and 235 deletions

View File

@@ -102,8 +102,9 @@ struct device {
/* Monotonically increasing ID for the device. */
int id;
/* Indicates whether this device is enabled. */
/* Indicates device status (enabled / hidden or not). */
int enabled;
int hidden;
/* Subsystem IDs for the device. */
int subsystem_vendor;
@@ -147,7 +148,7 @@ extern struct bus *root_parent;
struct device *new_device(struct bus *parent,
struct chip_instance *chip_instance,
const int bustype, const char *devnum,
int enabled);
int status);
void add_resource(struct bus *bus, int type, int index, int base);