Attention is currently required from: Jeff Daly, Mariusz Szafrański, Suresh Bellampalli, Stefan Reinauer, Vanessa Eusebio.
Fabio Aiuto has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68102 )
Change subject: treewide: use helpers to check for enabled pci devices ......................................................................
treewide: use helpers to check for enabled pci devices
use helpers to check for pci devices instead of open-coded solution.
TEST: compiled and qemu run successfully
Signed-off-by: Fabio Aiuto fabioaiuto83@gmail.com Change-Id: Idb992904112db611119b2d33c8b1dd912b2c8539 --- M src/arch/x86/mpspec.c M src/soc/intel/broadwell/pch/lpc.c M src/soc/intel/common/block/lpc/lpc_lib.c M src/soc/intel/denverton_ns/lpc.c M src/southbridge/intel/bd82x6x/lpc.c M src/southbridge/intel/i82801gx/lpc.c M src/southbridge/intel/i82801ix/lpc.c M src/southbridge/intel/i82801jx/lpc.c M src/southbridge/intel/ibexpeak/lpc.c M src/southbridge/intel/lynxpoint/lpc.c A util/ifdtool/backup-3.rom 11 files changed, 26 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/68102/1
diff --git a/src/arch/x86/mpspec.c b/src/arch/x86/mpspec.c index 2e65e25..739d185 100644 --- a/src/arch/x86/mpspec.c +++ b/src/arch/x86/mpspec.c @@ -575,7 +575,7 @@
for (dev = all_devices; dev; dev = dev->next) {
- if (dev->path.type != DEVICE_PATH_PCI || !dev->enabled) + if (!is_enabled_pci(dev)) continue;
have_fixed_entries = 0; diff --git a/src/soc/intel/broadwell/pch/lpc.c b/src/soc/intel/broadwell/pch/lpc.c index 5c4103d..5a1623f 100644 --- a/src/soc/intel/broadwell/pch/lpc.c +++ b/src/soc/intel/broadwell/pch/lpc.c @@ -86,7 +86,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/soc/intel/common/block/lpc/lpc_lib.c b/src/soc/intel/common/block/lpc/lpc_lib.c index 99e3749..d499918 100644 --- a/src/soc/intel/common/block/lpc/lpc_lib.c +++ b/src/soc/intel/common/block/lpc/lpc_lib.c @@ -436,7 +436,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { uint8_t int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(PCI_BDF(irq_dev), PCI_INTERRUPT_PIN); diff --git a/src/soc/intel/denverton_ns/lpc.c b/src/soc/intel/denverton_ns/lpc.c index 1fc1ea3..5d1eda5 100644 --- a/src/soc/intel/denverton_ns/lpc.c +++ b/src/soc/intel/denverton_ns/lpc.c @@ -254,7 +254,7 @@ int8_t original_int_pin = 0, new_int_pin = 0, swiz_int_pin = 0; uint8_t int_line = 0xff;
- if (irq_dev->path.type != DEVICE_PATH_PCI || !irq_dev->enabled) { + if (!is_enabled_pci(irq_dev)) { printk(BIOS_ERR, "%s for non pci device?\n", __func__); goto dnv_get_int_line_done; } @@ -380,7 +380,7 @@ int devfn = irq_dev->path.pci.devfn; u8 int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c index b2e6344..4635189 100644 --- a/src/southbridge/intel/bd82x6x/lpc.c +++ b/src/southbridge/intel/bd82x6x/lpc.c @@ -104,7 +104,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin=0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index a12e36b..4d82706 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -86,7 +86,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/i82801ix/lpc.c b/src/southbridge/intel/i82801ix/lpc.c index 9f70d1f..e39c95a 100644 --- a/src/southbridge/intel/i82801ix/lpc.c +++ b/src/southbridge/intel/i82801ix/lpc.c @@ -89,7 +89,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/i82801jx/lpc.c b/src/southbridge/intel/i82801jx/lpc.c index e3881ff..41bcccd 100644 --- a/src/southbridge/intel/i82801jx/lpc.c +++ b/src/southbridge/intel/i82801jx/lpc.c @@ -98,7 +98,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c index 1735020..d4e3098 100644 --- a/src/southbridge/intel/ibexpeak/lpc.c +++ b/src/southbridge/intel/ibexpeak/lpc.c @@ -96,7 +96,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin=0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c index 7ae847b..20e40cb 100644 --- a/src/southbridge/intel/lynxpoint/lpc.c +++ b/src/southbridge/intel/lynxpoint/lpc.c @@ -120,7 +120,7 @@ for (irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) { u8 int_pin = 0, int_line = 0;
- if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI) + if (!is_enabled_pci(irq_dev)) continue;
int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN); diff --git a/util/ifdtool/backup-3.rom b/util/ifdtool/backup-3.rom new file mode 100644 index 0000000..4213f1c --- /dev/null +++ b/util/ifdtool/backup-3.rom Binary files differ