From: Teerth Reddy <tee...@ti.com>

The UART clocks should not be turned on in resume idle path. The UART clocks
should be turned on only when there is a uart wakeup event. This optimization
will help save power.

Signed-off-by: Raja Govindraj <govindraj.r...@ti.com>
Signed-off-by: Teerth Reddy <tee...@ti.com>
---
 arch/arm/mach-omap2/serial.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 3771254..d545eed 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -343,6 +343,7 @@ static void omap_uart_idle_timer(unsigned long data)
 {
        struct omap_uart_state *uart = (struct omap_uart_state *)data;
 
+       uart->timeout = DEFAULT_TIMEOUT;
        omap_uart_allow_sleep(uart);
 }
 
@@ -364,7 +365,6 @@ void omap_uart_resume_idle(int num)
 
        list_for_each_entry(uart, &uart_list, node) {
                if (num == uart->num) {
-                       omap_uart_enable_clocks(uart);
 
                        /* Check for IO pad wakeup */
                        if (cpu_is_omap34xx() && uart->padconf) {
@@ -436,7 +436,7 @@ static void omap_uart_idle_init(struct omap_uart_state 
*uart)
        int ret;
 
        uart->can_sleep = 0;
-       uart->timeout = DEFAULT_TIMEOUT;
+       uart->timeout = 30 * HZ;
        setup_timer(&uart->timer, omap_uart_idle_timer,
                    (unsigned long) uart);
        if (uart->timeout)
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to