From 23fa3236aef2f4fe32d3368d439ee93a5b2a4577 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Mon, 5 Jan 2015 11:36:39 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/238412 Reviewed-by: Vincent Palatin Reviewed-by: Randall Spangler --- chip/lm4/clock.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.1