summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-08-01 18:07:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-08-23 13:20:38 -0700
commitcac3f7c60f5a62ae3c696b02581e750c7dedb2fe (patch)
treeb424c5ea87a4850b7f6afd959b5bcca2dbda546b /include
parent6853d78b821d3e0bdfe39dcde9b031f0eab162fa (diff)
downloadchrome-ec-cac3f7c60f5a62ae3c696b02581e750c7dedb2fe.tar.gz
kukui/emmc: Disable eMMC emulation when not needed
When AP is off, or after it has booted, disable eMMC emulation, to save power. We also add a new sleepmask bit SLEEP_MASK_EMMC to make sure the EC does not deep sleep when emulating eMMC (timing is very critical). We only try to emulate for 5 seconds after boot, after which we shut down the SPI controller. 5 seconds is enough for multiple boot attempts by the AP. BRANCH=none BUG=b:110907438 TEST=Power up kukui, apshutdown, powerb, repeatedly, see that AP always boots up properly. TEST=EC power consumption in S5/G3 drops from ~6mW to 0.6mW. Change-Id: I32cc11418faa695ccf340784acbe7fa99bf74d8c Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1181009 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/system.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index bce8689503..c040bca840 100644
--- a/include/system.h
+++ b/include/system.h
@@ -431,6 +431,7 @@ enum {
* detection ongoing */
SLEEP_MASK_PLL = (1 << 12), /* High-speed PLL in-use */
SLEEP_MASK_ADC = (1 << 13), /* ADC conversion ongoing */
+ SLEEP_MASK_EMMC = (1 << 14), /* eMMC emulation ongoing */
SLEEP_MASK_FORCE_NO_DSLEEP = (1 << 15), /* Force disable. */