John Zhao has uploaded this change for review.

View Change

device: Enable ASPM for TBT PCIe root ports

The virtual/generic device under TBT PCIe root ports has path type as
DEVICE_PATH_GENERIC. While scanning the pcie bus, the generic device
blocks its root ports configuration. This change adds device path type
check and enables ASPM for TBT root ports.

BUG=b:173207454
TEST=Built image and booted to kernel on Voxel board. Verified both of
the TBT Root ports 00:07.0 and 00:07.1 ASPM are enabled.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I82ffaeb5a8821d9034d8dae9d98d3b5953a9608b
---
M src/device/pciexp_device.c
1 file changed, 3 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/47686/1
diff --git a/src/device/pciexp_device.c b/src/device/pciexp_device.c
index 8d4bb98..e85fe87 100644
--- a/src/device/pciexp_device.c
+++ b/src/device/pciexp_device.c
@@ -446,7 +446,7 @@
unsigned int root_cap, cap;

cap = pci_find_capability(dev, PCI_CAP_ID_PCIE);
- if (!cap)
+ if ( !cap && (dev->path.type != DEVICE_PATH_GENERIC) )
return;

root_cap = pci_find_capability(root, PCI_CAP_ID_PCIE);
@@ -480,7 +480,8 @@
pci_scan_bus(bus, min_devfn, max_devfn);

for (child = bus->children; child; child = child->sibling) {
- if (child->path.type != DEVICE_PATH_PCI)
+ if ( (child->path.type != DEVICE_PATH_PCI) &&
+ (child->path.type != DEVICE_PATH_GENERIC) )
continue;
if ((child->path.pci.devfn < min_devfn) ||
(child->path.pci.devfn > max_devfn)) {

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I82ffaeb5a8821d9034d8dae9d98d3b5953a9608b
Gerrit-Change-Number: 47686
Gerrit-PatchSet: 1
Gerrit-Owner: John Zhao <john.zhao@intel.com>
Gerrit-MessageType: newchange