Bill XIE has uploaded this change for review.

View Change

mb/lenovo/x200: Correct device tree override logic

If a device node should be enabled on some variants, but disabled on
others, it had better be declared as disabled (rather than absent) in
base device tree (rather than override tree for the variant disabling
it), and enabled in override tree for the variant needing it, so that
it does not need to be declared once more when adding another variant
with such node disabled.

Change-Id: I4b28360905ae38149ace9ac5d21cd6d5045b7584
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
---
M src/mainboard/lenovo/x200/devicetree.cb
M src/mainboard/lenovo/x200/variants/x301/overridetree.cb
2 files changed, 1 insertion(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/36347/1
diff --git a/src/mainboard/lenovo/x200/devicetree.cb b/src/mainboard/lenovo/x200/devicetree.cb
index fdd69ec..3c4e094 100644
--- a/src/mainboard/lenovo/x200/devicetree.cb
+++ b/src/mainboard/lenovo/x200/devicetree.cb
@@ -108,7 +108,7 @@
device pci 1c.2 on
subsystemid 0x17aa 0x20f3 # UWB
end # PCIe Port #3
- # PCIe Port #4 is configured in override tree.
+ device pci 1c.3 off end # PCIe Port #4
device pci 1c.4 off end # PCIe Port #5
device pci 1c.5 off end # PCIe Port #6
device pci 1d.0 on # UHCI
diff --git a/src/mainboard/lenovo/x200/variants/x301/overridetree.cb b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb
index fafe5e9..03cb4df 100644
--- a/src/mainboard/lenovo/x200/variants/x301/overridetree.cb
+++ b/src/mainboard/lenovo/x200/variants/x301/overridetree.cb
@@ -8,7 +8,6 @@
register "pcie_power_limits" = "{ { 10, 0 }, { 10, 0 }, { 10, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }"
# x301 has no Express Card slot.
register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"
- device pci 1c.3 off end # PCIe Port #4
end
end
end

To view, visit change 36347. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4b28360905ae38149ace9ac5d21cd6d5045b7584
Gerrit-Change-Number: 36347
Gerrit-PatchSet: 1
Gerrit-Owner: Bill XIE <persmule@hardenedlinux.org>
Gerrit-MessageType: newchange