summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2018-08-21 17:17:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-22 04:07:42 -0700
commiteb2de572ba72cfdc5bbd93f40c4eed1a6d5cc9d9 (patch)
tree969191d884287c036482febd2530e63eb8728e2c /power
parent0feb2fc0d0a4f2aec948ac045c2d6d99f9c77a80 (diff)
downloadchrome-ec-eb2de572ba72cfdc5bbd93f40c4eed1a6d5cc9d9.tar.gz
ICL: Fix the timeout value for SUS_SLP_L in G3S5 state
The function power_wait_signals_timeout() expects the timeout value to be in usec, but a value in msec was being passed in. In addition, measuring on a system shows that the signal wait is ~150 msec, so increased the timeout value to 250 mSec. BUG=b:112913718 BRANCH=none TEST=Verfied that with this change I no longer see the console message: SLP_SUS_L didn't go high! Assuming G3. powerinfo shows: > powerinfo [2470.263452 power state 3 = S0, in 0x003f] Change-Id: I6564cbab638b80234a2574f3f700d1f33c516de1 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1184330 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Diffstat (limited to 'power')
-rw-r--r--power/icelake.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/power/icelake.c b/power/icelake.c
index e9025b4d04..4e7b829322 100644
--- a/power/icelake.c
+++ b/power/icelake.c
@@ -18,7 +18,8 @@
/* Console output macros */
#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args)
-#define IN_PCH_SLP_SUS_WAIT_TIME_MS 100
+/* The wait time is ~150 msec, allow for safety margin. */
+#define IN_PCH_SLP_SUS_WAIT_TIME_USEC (250 * MSEC)
static int forcing_shutdown; /* Forced shutdown in progress? */
@@ -112,9 +113,12 @@ enum power_state power_handle_state(enum power_state state)
CPRINTS("Pass thru GPIO_DSW_PWROK: %d", dswpwrok_in);
dswpwrok_out = dswpwrok_in;
- /* Now wait 100ms for SLP_SUS_L to go high based on tPCH32 */
+ /*
+ * Now wait for SLP_SUS_L to go high based on tPCH32. If this
+ * signal doesn't go high within 250 msec then go back to G3.
+ */
if (power_wait_signals_timeout(IN_PCH_SLP_SUS_DEASSERTED,
- IN_PCH_SLP_SUS_WAIT_TIME_MS) != EC_SUCCESS) {
+ IN_PCH_SLP_SUS_WAIT_TIME_USEC) != EC_SUCCESS) {
CPRINTS("SLP_SUS_L didn't go high! Assuming G3.");
return POWER_G3;
}