Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82406?usp=email )
Change subject: util/autoport: Put devicetree devices above chips ......................................................................
util/autoport: Put devicetree devices above chips
For Sandy/Ivy Bridge boards, this results in northbridge devices ending up north of (above) southbridge devices. Which is the convention pretty much all boards in the tree uses.
Change-Id: I9dc2ff13182ff9d92141b1736796749cea49d23a Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/82406 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M util/autoport/main.go 1 file changed, 28 insertions(+), 28 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/util/autoport/main.go b/util/autoport/main.go index 8a3ee6c..3b08515 100644 --- a/util/autoport/main.go +++ b/util/autoport/main.go @@ -277,34 +277,6 @@ }
for _, slot := range dev.PCISlots { - slotChip, ok := unmatchedPCIChips[slot.PCIAddr] - - if !ok { - continue - } - - if slot.additionalComment != "" && slotChip.Comment != "" { - slotChip.Comment = slot.additionalComment + " " + slotChip.Comment - } else { - slotChip.Comment = slot.additionalComment + slotChip.Comment - } - - delete(unmatchedPCIChips, slot.PCIAddr) - MatchDev(&slotChip) - dev.Children = append(dev.Children, slotChip) - } - - if dev.PCIController { - for slot, slotDev := range unmatchedPCIChips { - if slot.Bus == dev.ChildPCIBus { - delete(unmatchedPCIChips, slot) - MatchDev(&slotDev) - dev.Children = append(dev.Children, slotDev) - } - } - } - - for _, slot := range dev.PCISlots { slotDev, ok := unmatchedPCIDevices[slot.PCIAddr] if !ok { if slot.writeEmpty { @@ -334,6 +306,34 @@ delete(unmatchedPCIDevices, slot.PCIAddr) }
+ for _, slot := range dev.PCISlots { + slotChip, ok := unmatchedPCIChips[slot.PCIAddr] + + if !ok { + continue + } + + if slot.additionalComment != "" && slotChip.Comment != "" { + slotChip.Comment = slot.additionalComment + " " + slotChip.Comment + } else { + slotChip.Comment = slot.additionalComment + slotChip.Comment + } + + delete(unmatchedPCIChips, slot.PCIAddr) + MatchDev(&slotChip) + dev.Children = append(dev.Children, slotChip) + } + + if dev.PCIController { + for slot, slotDev := range unmatchedPCIChips { + if slot.Bus == dev.ChildPCIBus { + delete(unmatchedPCIChips, slot) + MatchDev(&slotDev) + dev.Children = append(dev.Children, slotDev) + } + } + } + if dev.MissingParent != "" { for _, child := range MissingChildren[dev.MissingParent] { MatchDev(&child)