aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/acpi.c
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2021-06-09 03:54:58 +0530
committerSubrata Banik <subrata.banik@intel.com>2021-06-16 03:47:46 +0000
commit54a3417254858fda03476f6bbbad37d7f8d251e6 (patch)
tree2ca056855e1f76475bc2823d4d994e94bc6903cd /src/soc/intel/apollolake/acpi.c
parent09a6d633aeed5986bb503482ebdf28fc1851c631 (diff)
soc/intel/apollolake: Make use of is_devfn_enabled() function
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 Reef. Signed-off-by: Subrata Banik <subrata.banik@intel.com> Change-Id: I900038dd4b2e2d89b1236bbd26bec5f34483b9f3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55327 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/apollolake/acpi.c')
-rw-r--r--src/soc/intel/apollolake/acpi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c
index 34f760ff42..ae202456a0 100644
--- a/src/soc/intel/apollolake/acpi.c
+++ b/src/soc/intel/apollolake/acpi.c
@@ -143,7 +143,6 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
static unsigned long soc_fill_dmar(unsigned long current)
{
- struct device *const igfx_dev = pcidev_path_on_root(SA_DEVFN_IGD);
uint64_t gfxvtbar = MCHBAR64(GFXVTBAR) & VTBAR_MASK;
uint64_t defvtbar = MCHBAR64(DEFVTBAR) & VTBAR_MASK;
bool gfxvten = MCHBAR32(GFXVTBAR) & VTBAR_ENABLED;
@@ -151,7 +150,7 @@ static unsigned long soc_fill_dmar(unsigned long current)
unsigned long tmp;
/* IGD has to be enabled, GFXVTBAR set and enabled. */
- const bool emit_igd = is_dev_enabled(igfx_dev) && gfxvtbar && gfxvten;
+ const bool emit_igd = is_devfn_enabled(SA_DEVFN_IGD) && gfxvtbar && gfxvten;
/* First, add DRHD entries */
if (emit_igd) {