summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/smihandler.c
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-11-04 00:19:28 +0100
committerMichael Niewöhner <foss@mniewoehner.de>2020-11-13 22:30:29 +0000
commit50a1072180f05c20ec13d521af6f8930ceabb2c3 (patch)
treec543067d8a7a77d49e6413a38774a71833c15b46 /src/soc/intel/cannonlake/smihandler.c
parent99b38a9c2fb3bbf52ad254bfcabc80c2d19d3185 (diff)
downloadcoreboot-50a1072180f05c20ec13d521af6f8930ceabb2c3.tar.xz
soc/intel/cnl: replace the remains of HeciEnabled by device state in dt
The option `HeciEnabled` was partly replaced by use of the device on/off state in the devicetree in commit 3de90d1. The option has been removed from the corresponding boards, so `HeciEnabled` is always 0 and ME always gets disabled during soc finalize, when `HECI_DISABLE_USING_SMM` is set. Replace the option in the finalize function by the same dt state check that sets the FSP option and drop the remaints of `HeciEnabled`. Devicetrees still having `HeciEnabled` have been adapted to keep the current behaviour. Change-Id: Ib4cca9099b9aa3434552a41fbafca7cf6a0dd0eb Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47195 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/cannonlake/smihandler.c')
-rw-r--r--src/soc/intel/cannonlake/smihandler.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/soc/intel/cannonlake/smihandler.c b/src/soc/intel/cannonlake/smihandler.c
index 266c258966..dd8db5b1f5 100644
--- a/src/soc/intel/cannonlake/smihandler.c
+++ b/src/soc/intel/cannonlake/smihandler.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
-#include <device/pci_def.h>
+#include <device/device.h>
#include <intelblocks/cse.h>
#include <intelblocks/smihandler.h>
#include <soc/soc_chip.h>
@@ -17,11 +17,11 @@
*/
void smihandler_soc_at_finalize(void)
{
- const struct soc_intel_cannonlake_config *config;
+ if (!CONFIG(HECI_DISABLE_USING_SMM))
+ return;
- config = config_of_soc();
-
- if (!config->HeciEnabled && CONFIG(HECI_DISABLE_USING_SMM))
+ const struct device *dev = pcidev_path_on_root(PCH_DEVFN_CSE);
+ if (!is_dev_enabled(dev))
heci_disable();
}