summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/systemagent.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-06-23 12:13:57 +0200
committerWerner Zeh <werner.zeh@siemens.com>2021-06-25 04:21:56 +0000
commit7ff3f31cd17a08a5052b29879c50287d76a1f094 (patch)
tree4ce41450e6de8f57f3400a1dbc3df27802078c1f /src/soc/intel/skylake/systemagent.c
parentbb0c404e6e1207d58a574c78c63660a7e7b0f368 (diff)
soc/intel/skylake: Use `is_devfn_enabled()`
Use the `is_devfn_enabled()` function for the sake of brevity. Change-Id: Ic848767799e165200f26c2d5a58fbd3b72b9c240 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55786 Reviewed-by: Subrata Banik <subrata.banik@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/skylake/systemagent.c')
-rw-r--r--src/soc/intel/skylake/systemagent.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/soc/intel/skylake/systemagent.c b/src/soc/intel/skylake/systemagent.c
index 8b644354ab..2b297670b1 100644
--- a/src/soc/intel/skylake/systemagent.c
+++ b/src/soc/intel/skylake/systemagent.c
@@ -28,8 +28,6 @@ bool soc_is_vtd_capable(void)
*/
void soc_add_fixed_mmio_resources(struct device *dev, int *index)
{
- struct device *const igd_dev = pcidev_path_on_root(SA_DEVFN_IGD);
-
static const struct sa_mmio_descriptor soc_fixed_resources[] = {
{ PCIEXBAR, CONFIG_MMCONF_BASE_ADDRESS, CONFIG_MMCONF_LENGTH,
"PCIEXBAR" },
@@ -44,7 +42,7 @@ void soc_add_fixed_mmio_resources(struct device *dev, int *index)
ARRAY_SIZE(soc_fixed_resources));
if (soc_is_vtd_capable()) {
- if (igd_dev && igd_dev->enabled)
+ if (is_devfn_enabled(SA_DEVFN_IGD))
sa_add_fixed_mmio_resources(dev, index,
&soc_gfxvt_mmio_descriptor, 1);