diff options
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/pmc/pmc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/pmc/pmc.c b/src/soc/intel/common/block/pmc/pmc.c index 8598cb5d77..333bace04f 100644 --- a/src/soc/intel/common/block/pmc/pmc.c +++ b/src/soc/intel/common/block/pmc/pmc.c @@ -8,6 +8,7 @@ #include <intelblocks/acpi.h> #include <intelblocks/pmc.h> #include <soc/pci_devs.h> +#include <soc/pm.h> static void pch_pmc_add_new_resource(struct device *dev, uint8_t offset, uintptr_t base, size_t size, @@ -80,6 +81,22 @@ static void pmc_fill_ssdt(const struct device *dev) generate_acpi_power_engine(); } +/* + * `pmc_final` function is native implementation of equivalent events performed by + * each FSP NotifyPhase() API invocations. + * + * + * Clear PMCON status bits (Global Reset/Power Failure/Host Reset Status bits) + * + * Perform the PMCON status bit clear operation from `.final` + * to cover any such chances where later boot stage requested a global + * reset and PMCON status bit remains set. + */ +static void pmc_final(struct device *dev) +{ + pmc_clear_pmcon_sts(); +} + static struct device_operations device_ops = { .read_resources = pch_pmc_read_resources, .set_resources = pci_dev_set_resources, @@ -90,6 +107,7 @@ static struct device_operations device_ops = { #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = pmc_fill_ssdt, #endif + .final = pmc_final, }; static const unsigned short pci_device_ids[] = { |