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>
This commit is contained in:
parent
ea54d3e4d0
commit
2e7905b1a3
@ -276,34 +276,6 @@ func MatchDev(dev *DevTreeNode) {
|
|||||||
MatchDev(&dev.Children[idx])
|
MatchDev(&dev.Children[idx])
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
for _, slot := range dev.PCISlots {
|
||||||
slotDev, ok := unmatchedPCIDevices[slot.PCIAddr]
|
slotDev, ok := unmatchedPCIDevices[slot.PCIAddr]
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -334,6 +306,34 @@ func MatchDev(dev *DevTreeNode) {
|
|||||||
delete(unmatchedPCIDevices, slot.PCIAddr)
|
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 != "" {
|
if dev.MissingParent != "" {
|
||||||
for _, child := range MissingChildren[dev.MissingParent] {
|
for _, child := range MissingChildren[dev.MissingParent] {
|
||||||
MatchDev(&child)
|
MatchDev(&child)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user