summaryrefslogtreecommitdiff
path: root/src/soc/intel/alderlake/pmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/alderlake/pmc.c')
-rw-r--r--src/soc/intel/alderlake/pmc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/intel/alderlake/pmc.c b/src/soc/intel/alderlake/pmc.c
index e4c100933c..03399c312e 100644
--- a/src/soc/intel/alderlake/pmc.c
+++ b/src/soc/intel/alderlake/pmc.c
@@ -18,6 +18,7 @@
#include <soc/pm.h>
#include <soc/soc_chip.h>
#include <stdint.h>
+#include <bootstate.h>
#define PMC_HID "INTC1026"
@@ -141,6 +142,14 @@ static void soc_acpi_mode_init(struct device *dev)
pmc_set_acpi_mode();
}
+static void pm1_enable_pwrbtn_smi(void *unused)
+{
+ /* Enable power button SMI after BS_DEV_INIT_CHIPS (FSP-S) is done. */
+ pmc_update_pm1_enable(PWRBTN_EN);
+}
+
+BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_EXIT, pm1_enable_pwrbtn_smi, NULL);
+
struct device_operations pmc_ops = {
.read_resources = soc_pmc_read_resources,
.set_resources = noop_set_resources,