summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks/pmclib.h
diff options
context:
space:
mode:
authorV Sowmya <v.sowmya@intel.com>2020-09-02 16:40:24 +0530
committerPatrick Georgi <pgeorgi@google.com>2020-09-15 07:02:04 +0000
commit186250f68e432f0c32b0c9909be6008cbc6aca47 (patch)
tree6e67e0a189e9859e584b9fac6593afbda19ecb3c /src/soc/intel/common/block/include/intelblocks/pmclib.h
parent98b0a988919e905e8cf4901a4471d7ab50f8a7c9 (diff)
downloadcoreboot-186250f68e432f0c32b0c9909be6008cbc6aca47.tar.xz
common/block/pmc: Add a check to program the PchPmPwrCycDur
This patch adds a check to avoid violating the PCH EDS recommendation that the PchPmPwrCycDur will never be smaller than the the SLP_Sx assertion widths. This code was initially added for cannonlake and now moving it to common code since the same check will be used to program the PchPmPwrCycDur for Jasperlake and Tigerlake. Change-Id: Ie7d5f54939c5eb1f885d303f75a04958b9d77f4d Signed-off-by: V Sowmya <v.sowmya@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45028 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks/pmclib.h')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/pmclib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h
index 2b06a504d4..2123c4a6b7 100644
--- a/src/soc/intel/common/block/include/intelblocks/pmclib.h
+++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h
@@ -220,4 +220,13 @@ void pmc_soc_set_afterg3_en(bool on);
*/
void pmc_set_power_failure_state(bool target_on);
+/*
+ * This function ensures that the duration programmed in the PchPmPwrCycDur will never be
+ * smaller than the SLP_Sx assertion widths.
+ * If the pm_pwr_cyc_dur is less than any of the SLP_Sx assertion widths then it returns the
+ * default value PCH_PM_PWR_CYC_DUR.
+ */
+uint8_t get_pm_pwr_cyc_dur(uint8_t slp_s4_min_assert, uint8_t slp_s3_min_assert,
+ uint8_t slp_a_min_assert, uint8_t pm_pwr_cyc_dur);
+
#endif /* SOC_INTEL_COMMON_BLOCK_PMCLIB_H */