diff options
author | Felix Singer <felixsinger@posteo.net> | 2024-04-30 16:25:28 +0200 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2024-05-02 16:07:49 +0000 |
commit | fbf260a0d5f3b33f32e6d45785cae13ca5515a92 (patch) | |
tree | 3987b0faa19c83200865e478ff6a3953eef4c2bf /src/soc/intel/cannonlake/acpi.c | |
parent | 5ed9fe94972e8383edd7929ccce4d9b73823a362 (diff) |
soc/intel/cannonlake: Clean up device enablement configuration
Clean up by using is_devfn_enabled().
Change-Id: I9a4984a096e72025e161bf117b70a7c59f2bb094
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82118
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/cannonlake/acpi.c')
-rw-r--r-- | src/soc/intel/cannonlake/acpi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/soc/intel/cannonlake/acpi.c b/src/soc/intel/cannonlake/acpi.c index 9cad4ffaeb..a58c4f01f4 100644 --- a/src/soc/intel/cannonlake/acpi.c +++ b/src/soc/intel/cannonlake/acpi.c @@ -255,10 +255,9 @@ int soc_madt_sci_irq_polarity(int sci) 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; bool gfxvten = MCHBAR32(GFXVTBAR) & VTBAR_ENABLED; - const bool emit_igd = igfx_dev && igfx_dev->enabled && gfxvtbar && gfxvten; + const bool emit_igd = is_devfn_enabled(SA_DEVFN_IGD) && gfxvtbar && gfxvten; if (emit_igd) { unsigned long tmp = current; @@ -268,11 +267,10 @@ static unsigned long soc_fill_dmar(unsigned long current) acpi_dmar_drhd_fixup(tmp, current); } - struct device *const ipu_dev = pcidev_path_on_root(SA_DEVFN_IPU); uint64_t ipuvtbar = MCHBAR64(IPUVTBAR) & VTBAR_MASK; bool ipuvten = MCHBAR32(IPUVTBAR) & VTBAR_ENABLED; - if (ipu_dev && ipu_dev->enabled && ipuvtbar && ipuvten) { + if (is_devfn_enabled(SA_DEVFN_IPU) && ipuvtbar && ipuvten) { unsigned long tmp = current; current += acpi_create_dmar_drhd(current, 0, 0, ipuvtbar); |