diff options
author | Kyoung Kim <kyoung.il.kim@intel.com> | 2017-08-30 18:28:11 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-31 04:52:19 -0700 |
commit | 2c9dea11720b96d866785f81c1e0dc3bd206183e (patch) | |
tree | 36e148a84b9021acd7543d762bae6e11b1ceccf0 | |
parent | cde2cf1d11a88ba021340b505fa1fc09fe48fa03 (diff) | |
download | chrome-ec-2c9dea11720b96d866785f81c1e0dc3bd206183e.tar.gz |
ISH: added sleep mask for UART port
added UART sleep mask not to allow to enter into deep sleep.
BUG=None
BRANCH=master
Test='make -j buildall'
Change-Id: I15e55c2c94276da99339465f2ea577b1f94e1ce4
Signed-off-by: Kyoung Kim <kyoung.il.kim@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/644848
Commit-Ready: Kyoung Il Kim <kyoung.il.kim@intel.com>
Tested-by: Kyoung Il Kim <kyoung.il.kim@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | chip/ish/uart.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/ish/uart.c b/chip/ish/uart.c index 27539dc009..b810c0eb52 100644 --- a/chip/ish/uart.c +++ b/chip/ish/uart.c @@ -63,6 +63,9 @@ void uart_tx_start(void) if ( REG8(IER(id) & IER_TDRQ) ) return; + /* Do not allow deep sleep while transmit in progress */ + disable_sleep(SLEEP_MASK_UART); + /* TODO: disable low power mode while transmit */ REG8(IER(id)) |= IER_TDRQ; @@ -76,6 +79,9 @@ void uart_tx_stop(void) #if !defined(CONFIG_POLLING_UART) enum UART_PORT id = UART_PORT_1; /* UART1 for ISH */ + /* Re-allow deep sleep */ + enable_sleep(SLEEP_MASK_UART); + REG8(IER(id)) &= ~IER_TDRQ; /* TODO: re-enable low power mode */ |