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>
This commit is contained in:
Angel Pons
2021-06-23 12:13:57 +02:00
committed by Werner Zeh
parent bb0c404e6e
commit 7ff3f31cd1
5 changed files with 24 additions and 57 deletions

View File

@ -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);