Hello Felix Singer, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth, Furquan Shaikh, Tim Wawrzynczak, Paul Menzel, Subrata Banik, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46531
to look at the new patch set (#6).
Change subject: util/sconfig: allow to override chip-wrapped devices ......................................................................
util/sconfig: allow to override chip-wrapped devices
Currently, when a overridetree disables a device wrapped by a chip driver in the base tree, without having the same wrapping chip, sconfig mistakenly creates two instances of the same device. This leads to a conflict. The following example shows that:
base tree:
chip soc/intel/whateverlake device domain 0 on chip drivers/wifi/generic device pci 14.3 on end end end end
overridetree:
... device pci 14.3 off end ...
The static.[ch] then contains two declarations of the same device:
extern DEVTREE_CONST struct device *DEVTREE_CONST __pci_0_14_3; ... extern DEVTREE_CONST struct device *DEVTREE_CONST __pci_0_14_3;
The same problem appears with the newly introduced chipset devicetrees, that only include the device without chip driver. An overridetree wrapping such device by a chip driver - which the same example above with swapped base and overridetree represents - will lead to the same problem.
To cover such use cases, move the match check for chip drivers into the device update procedure and override the base chip accordingly if the chip driver does not match. If the chip driver matches, there is no change to the original behaviour.
Change-Id: I6364b3a6e1804a23503f42c66c5001e42f911270 Signed-off-by: Michael Niewöhner foss@mniewoehner.de --- M util/sconfig/main.c 1 file changed, 38 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/46531/6