Attention is currently required from: Damien Zammit, Angel Pons.
Fabio Aiuto has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68103 )
Change subject: treewide: use helper to check if pci device is on n-th bus ......................................................................
treewide: use helper to check if pci device is on n-th bus
use helper to check if pci device is on a particular bus number.
TEST: compiled and qemu run successfully
Signed-off-by: Fabio Aiuto fabioaiuto83@gmail.com Change-Id: I4a3e96381c29056de71953ea2c39cd540f3df191 --- M src/mainboard/emulation/qemu-i440fx/northbridge.c M src/northbridge/intel/gm45/northbridge.c M src/northbridge/intel/haswell/northbridge.c M src/northbridge/intel/i945/northbridge.c M src/northbridge/intel/ironlake/northbridge.c M src/northbridge/intel/pineview/northbridge.c M src/northbridge/intel/x4x/northbridge.c 7 files changed, 22 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/68103/1
diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c index 07f345a..957837e 100644 --- a/src/mainboard/emulation/qemu-i440fx/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -219,7 +219,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
return NULL; diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index 1078748..df5526c 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -159,7 +159,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) { diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 8465561..e84ba76 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -23,7 +23,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) { diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index 12debb2..3c5603c 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -101,7 +101,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) { diff --git a/src/northbridge/intel/ironlake/northbridge.c b/src/northbridge/intel/ironlake/northbridge.c index af602f1..fbad6d4 100644 --- a/src/northbridge/intel/ironlake/northbridge.c +++ b/src/northbridge/intel/ironlake/northbridge.c @@ -63,7 +63,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) { diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 3afdd3b..7e29db9 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -145,7 +145,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) { diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index cdf43c95..ac276b6 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -123,7 +123,7 @@ if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0";
- if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL;
switch (dev->path.pci.devfn) {