aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/denverton_ns
diff options
context:
space:
mode:
authorFabio Aiuto <fabioaiuto83@gmail.com>2022-09-30 11:25:28 +0200
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-06 18:32:21 +0000
commitd835da91552bc74892dce7b9d2aafb74ce86b1f2 (patch)
tree9930a94e31587b8f64dad63aab25971b15a3328f /src/soc/intel/denverton_ns
parent4fce79f69c04094fcdd6f2ee89e06a1a776a7deb (diff)
treewide: use predicates to check for enabled pci devices
use functions 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68102 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/denverton_ns')
-rw-r--r--src/soc/intel/denverton_ns/lpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/denverton_ns/lpc.c b/src/soc/intel/denverton_ns/lpc.c
index 1fc1ea35c7..5d1eda5e23 100644
--- a/src/soc/intel/denverton_ns/lpc.c
+++ b/src/soc/intel/denverton_ns/lpc.c
@@ -254,7 +254,7 @@ static u8 dnv_get_int_line(struct device *irq_dev)
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 @@ static void pch_pirq_init(struct device *dev)
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);