summaryrefslogtreecommitdiff
path: root/src/soc/intel/tigerlake/acpi.c
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2020-07-26 09:22:42 +0200
committerMichael Niewöhner <c0d3z3r0@review.coreboot.org>2020-07-28 08:36:59 +0000
commit5c10704f58982d62a1326e5d6ff9956e0eaf6e16 (patch)
tree0ec8560aba88de53168b21a71c4b74c9b314216c /src/soc/intel/tigerlake/acpi.c
parent0f823095620e9b6434e9c731468526654a7725ae (diff)
soc/intel/tigerlake: Simplify is-device-enabled checks
Simplify if-statements and use is_dev_enabled() where possible. Change-Id: I791273e5dd633cd1d6218b322106e2f62a393259 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43897 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/tigerlake/acpi.c')
-rw-r--r--src/soc/intel/tigerlake/acpi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/soc/intel/tigerlake/acpi.c b/src/soc/intel/tigerlake/acpi.c
index 235b2b3707..c7c544615e 100644
--- a/src/soc/intel/tigerlake/acpi.c
+++ b/src/soc/intel/tigerlake/acpi.c
@@ -7,6 +7,7 @@
#include <arch/smp/mpspec.h>
#include <cbmem.h>
#include <console/console.h>
+#include <device/device.h>
#include <device/pci_ops.h>
#include <ec/google/chromeec/ec.h>
#include <intelblocks/cpulib.h>
@@ -187,7 +188,7 @@ static unsigned long soc_fill_dmar(unsigned long current)
uint64_t gfxvtbar = MCHBAR64(GFXVTBAR) & VTBAR_MASK;
bool gfxvten = MCHBAR32(GFXVTBAR) & VTBAR_ENABLED;
- if (igfx_dev && igfx_dev->enabled && gfxvtbar && gfxvten) {
+ if (is_dev_enabled(igfx_dev) && gfxvtbar && gfxvten) {
unsigned long tmp = current;
current += acpi_create_dmar_drhd(current, 0, 0, gfxvtbar);
@@ -200,7 +201,7 @@ static unsigned long soc_fill_dmar(unsigned long current)
uint64_t ipuvtbar = MCHBAR64(IPUVTBAR) & VTBAR_MASK;
bool ipuvten = MCHBAR32(IPUVTBAR) & VTBAR_ENABLED;
- if (ipu_dev && ipu_dev->enabled && ipuvtbar && ipuvten) {
+ if (is_dev_enabled(ipu_dev) && ipuvtbar && ipuvten) {
unsigned long tmp = current;
current += acpi_create_dmar_drhd(current, 0, 0, ipuvtbar);