summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2021-03-30 15:19:12 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-04-10 20:22:54 +0000
commitf62bbc8388dd7ce6c34b40bc9a0bd21ab32ab96c (patch)
tree9f641dc792de201b65472226ad0f63a848a7af7f /src/soc
parent24295573503e5617fa18dcec24ae3f3402e452de (diff)
soc/amd/cezanne: Set Power state after power failure
Configure the power state to return to when the power is re-applied after power failure. BUG=b:183739671 TEST=Build and Boot to OS in Majolica and Guybrush. By default when the power fails the device turns on after power is re-applied. When the POWER_ON_AFTER_POWER_FAILURE is disabled, the device remains off even after the power is re-applied. Change-Id: I21c5da08c82156d6239450ef6921771da74cbaa1 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52049 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/cezanne/Kconfig1
-rw-r--r--src/soc/amd/cezanne/early_fch.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig
index 59dc4ec446..a27b26d124 100644
--- a/src/soc/amd/cezanne/Kconfig
+++ b/src/soc/amd/cezanne/Kconfig
@@ -49,6 +49,7 @@ config SOC_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_NONCAR
select SOC_AMD_COMMON_BLOCK_PCI
select SOC_AMD_COMMON_BLOCK_PCI_MMCONF
+ select SOC_AMD_COMMON_BLOCK_PM
select SOC_AMD_COMMON_BLOCK_PSP_GEN2
select SOC_AMD_COMMON_BLOCK_SMBUS
select SOC_AMD_COMMON_BLOCK_SMI
diff --git a/src/soc/amd/cezanne/early_fch.c b/src/soc/amd/cezanne/early_fch.c
index 5dca211764..fdfa17aad3 100644
--- a/src/soc/amd/cezanne/early_fch.c
+++ b/src/soc/amd/cezanne/early_fch.c
@@ -2,9 +2,10 @@
#include <amdblocks/acpimmio.h>
#include <amdblocks/espi.h>
+#include <amdblocks/i2c.h>
#include <amdblocks/lpc.h>
+#include <amdblocks/pmlib.h>
#include <amdblocks/smbus.h>
-#include <amdblocks/i2c.h>
#include <console/console.h>
#include <soc/i2c.h>
#include <soc/southbridge.h>
@@ -61,6 +62,7 @@ void fch_pre_init(void)
/* After console init */
void fch_early_init(void)
{
+ pm_set_power_failure_state();
fch_print_pmxc0_status();
i2c_soc_early_init();