summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-05 11:36:39 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-06 01:18:53 +0000
commit23fa3236aef2f4fe32d3368d439ee93a5b2a4577 (patch)
treeb67538f4eeeb4438f062c16185f19a8e0a4dddc2
parent7121b003d6d1eae31bd632ac0ac94aa4b352d8d5 (diff)
downloadchrome-ec-23fa3236aef2f4fe32d3368d439ee93a5b2a4577.tar.gz
lm4: decrease time to wake up from deep sleep to save power
Decrease the time to wake up from deep sleep when not using LFIOSC (when using PIOSC in deep sleep). This helps keep us in deep sleep longer and therefore save power. BUG=none BRANCH=samus TEST=Load onto samus and run for a couple of hours, varying from S0 to S5, with and without EC. Use idlestats to check that closest we get to missing deadline is 86us away. Change-Id: I3eee908e9f42a1c5b549e93d63588a3cb6e29a5d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/238412 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--chip/lm4/clock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/lm4/clock.c b/chip/lm4/clock.c
index 05027e0d95..5141a00f7b 100644
--- a/chip/lm4/clock.c
+++ b/chip/lm4/clock.c
@@ -26,6 +26,7 @@
#define PLL_CLOCK 66666667 /* System clock = 200MHz PLL/3 = 66.667MHz */
+#ifdef CONFIG_LOW_POWER_USE_LFIOSC
/*
* Length of time for the processor to wake up from deep sleep. Actual
* measurement gives anywhere up to 780us, depending on the mode it is coming
@@ -33,6 +34,13 @@
* sleep in our worst case deep sleep mode.
*/
#define DEEP_SLEEP_RECOVER_TIME_USEC 850
+#else
+/*
+ * Length of time for the processor to wake up from deep sleep. Datasheet
+ * maximum is 145us, but in practice have seen as much as 215us.
+ */
+#define DEEP_SLEEP_RECOVER_TIME_USEC 300
+#endif
/* Low power idle statistics */
#ifdef CONFIG_LOW_POWER_IDLE