summaryrefslogtreecommitdiff
path: root/include/clock.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2013-10-07 12:23:35 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-15 00:27:14 +0000
commitc5b90d7e77511e45f2c0021c1a0bc18b09310933 (patch)
treeaf3ab9f0b74cb239808cca51c681be840d32a107 /include/clock.h
parent193f2298bd1a078f1ac07aacf9dc50132cbb39d3 (diff)
downloadchrome-ec-c5b90d7e77511e45f2c0021c1a0bc18b09310933.tar.gz
lm4: Add a low power idle task.stabilize-4825.B
First implementation of a low power idle task for the LM4 chip. The low power mode is selected by defining CONFIG_LOW_POWER_IDLE in a board.h file. This commit turns it on for Peppy, Slippy, and Falco only because those are the only boards tested. When using the low power idle task, the chip goes in to deep sleep when it can. Deep sleep disables clocks to most peripherals and puts the onboard flash and RAM into a low power mode. The chip is woken out of deep sleep using the RTC in the hibernate module. Increased the idle task stack size to handle more involved idle task. In board.c, the array of GPIO info can be used to select which GPIO points can wake up the EC from deep sleep. Currenlty selected are the power button, lid open, AC present, PCH_SLP_S3, and PCH_SLP_S5. Additionally the port with the KB scan row GPIO point is also enabled to wake up the EC from deep sleep. Signed-off-by: Alec Berg <alecaberg@chromium.org> BUG=None BRANCH=none TEST=Passes all unit tests. Runs on slippy, peppy, and falco with no noticeable side affects. Verified that the power consumed by the EC is lower when in S3, S5 and G3 by scoping the sense resistor powering the chip. Change-Id: I83fa9a159a4b79201b99f2c32678dc4fc8921726 Reviewed-on: https://chromium-review.googlesource.com/172183 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Alec Berg <alecaberg@chromium.org> Tested-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/clock.h')
-rw-r--r--include/clock.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/include/clock.h b/include/clock.h
index 343b43ecee..875be91006 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -55,18 +55,6 @@ void clock_enable_pll(int enable, int notify);
*/
void clock_wait_cycles(uint32_t cycles);
-/* Low power modes for idle API */
-
-enum {
- SLEEP_MASK_AP_RUN = (1 << 0), /* the main CPU is running */
- SLEEP_MASK_UART = (1 << 1), /* UART communication on-going */
- SLEEP_MASK_I2C = (1 << 2), /* I2C master communication on-going */
- SLEEP_MASK_CHARGING = (1 << 3), /* Charging loop on-going */
- SLEEP_MASK_USB_PWR = (1 << 4), /* USB power loop on-going */
-
- SLEEP_MASK_FORCE = (1 << 31), /* Force disabling low power modes */
-};
-
/* Clock gate control modes for clock_enable_peripheral() */
#define CGC_MODE_RUN (1 << 0)
#define CGC_MODE_SLEEP (1 << 1)
@@ -93,7 +81,4 @@ void clock_enable_peripheral(uint32_t offset, uint32_t mask, uint32_t mode);
*/
void clock_disable_peripheral(uint32_t offset, uint32_t mask, uint32_t mode);
-void enable_sleep(uint32_t mask);
-void disable_sleep(uint32_t mask);
-
#endif /* __CROS_EC_CLOCK_H */