aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/acpi.c
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2020-07-26 09:26:52 +0200
committerMichael Niewöhner <c0d3z3r0@review.coreboot.org>2020-07-28 08:38:06 +0000
commit6c3a89c431e938c276e5ed01e21b60cf04b44504 (patch)
treef40ffa39cf494b54138478728f39350a958ae487 /src/soc/intel/apollolake/acpi.c
parentca4164e629a8162dc6b297c13a725a9f2b3ee4eb (diff)
soc/intel/apollolake: Simplify is-device-enabled checks
Simplify if-statements and use is_dev_enabled() where possible. Change-Id: Ieeec987dc2bfe5bdef31882edbbb36e52f63b0e6 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43899 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/apollolake/acpi.c')
-rw-r--r--src/soc/intel/apollolake/acpi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c
index 16f6090d10..96a142a89e 100644
--- a/src/soc/intel/apollolake/acpi.c
+++ b/src/soc/intel/apollolake/acpi.c
@@ -4,6 +4,7 @@
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
#include <console/console.h>
+#include <device/device.h>
#include <device/mmio.h>
#include <arch/smp/mpspec.h>
#include <assert.h>
@@ -170,7 +171,7 @@ static unsigned long soc_fill_dmar(unsigned long current)
unsigned long tmp;
/* IGD has to be enabled, GFXVTBAR set and enabled. */
- if (igfx_dev && igfx_dev->enabled && gfxvtbar && gfxvten) {
+ if (is_dev_enabled(igfx_dev) && gfxvtbar && gfxvten) {
tmp = current;
current += acpi_create_dmar_drhd(current, 0, 0, gfxvtbar);