sconfig: Apply 'hidden' state from override tree
In order to allow override trees to hide/unhide a device copy the hidden state to the base device. This allows a sequence of states like: chipset.cb: mark device 'off' by default devicetree.cb: mark device 'hidden' (to skip resource allocation) overridetree.cb: mark device 'on' for device present on a variant BUG=b:159143739 BRANCH=volteer TEST=build volteer variants with TCSS RP0 either hidden or on and check the resulting static.c to see if the hidden bit is set appropriately. Signed-off-by: Duncan Laurie <dlaurie@google.com> Change-Id: Iebe5f6d2fd93fbcc4329875565c2ebf4823da59b Reviewed-on: https://review.coreboot.org/c/coreboot/+/47197 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
98a9f1f61d
commit
7f6a484511
|
@ -1558,6 +1558,12 @@ static void update_device(struct device *base_dev, struct device *override_dev)
|
|||
*/
|
||||
base_dev->enabled = override_dev->enabled;
|
||||
|
||||
/*
|
||||
* Copy the hidden state of override device to base device. This allows
|
||||
* override tree to hide or unhide a particular device.
|
||||
*/
|
||||
base_dev->hidden = override_dev->hidden;
|
||||
|
||||
/*
|
||||
* Copy subsystem vendor and device ids from override device to base
|
||||
* device only if the ids are non-zero in override device. Else, honor
|
||||
|
|
Loading…
Reference in New Issue