ISH: added sleep mask for UART port
added UART sleep mask not to allow to enter into deep sleep.
BRANCH=master
Test='make -j buildall'
Commit-Ready: Kyoung Il Kim
Tested-by: Kyoung Il Kim
@@ -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 */
