diff options
author | Subrata Banik <subrata.banik@intel.com> | 2021-06-09 03:59:11 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2021-06-16 03:49:28 +0000 |
commit | 5b81b8890221d5929d742ffd2b25b55e0ade3185 (patch) | |
tree | 6b8e4dac092075d2597efb07b879ca2e7a1e2662 /src/soc/intel/elkhartlake/acpi.c | |
parent | 49a21093246237490d4ec08a531a104a0b6f4a7e (diff) |
soc/intel/elkhartlake: Make use of is_devfn_enabled()
1. Replace all pcidev_path_on_root() and is_dev_enabled() functions
combination with is_devfn_enabled().
2. Remove unused local variable of device structure type (struct device *).
3. Replace pcidev_path_on_root() and dev->enabled check with is_devfn_enabled()
call.
TEST=Able to build and boot without any regression seen on EHL.
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: Iadf9145a11f27ff0e182f146b6fe5a01e6cf3ed8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/elkhartlake/acpi.c')
-rw-r--r-- | src/soc/intel/elkhartlake/acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/soc/intel/elkhartlake/acpi.c b/src/soc/intel/elkhartlake/acpi.c index a0c966e89e..ed0421fb56 100644 --- a/src/soc/intel/elkhartlake/acpi.c +++ b/src/soc/intel/elkhartlake/acpi.c @@ -177,11 +177,10 @@ uint32_t soc_read_sci_irq_select(void) static unsigned long soc_fill_dmar(unsigned long current) { - const struct device *const igfx_dev = pcidev_path_on_root(SA_DEVFN_IGD); uint64_t gfxvtbar = MCHBAR64(GFXVTBAR) & VTBAR_MASK; bool gfxvten = MCHBAR32(GFXVTBAR) & VTBAR_ENABLED; - if (is_dev_enabled(igfx_dev) && gfxvtbar && gfxvten) { + if (is_devfn_enabled(SA_DEVFN_IGD) && gfxvtbar && gfxvten) { unsigned long tmp = current; current += acpi_create_dmar_drhd(current, 0, 0, gfxvtbar); |