diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2017-03-15 08:38:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-17 14:14:00 +0900 |
commit | 81e33b51ed69d2b2eaf3fbeb043144b9d9ec7629 (patch) | |
tree | 87ebfdba74cd5c44ccaef9b6780b4399a4b12e6d /drivers/tty/serial/xilinx_uartps.c | |
parent | 9d1d994d33fe4863c8caeeaac264664815f4c321 (diff) | |
download | linux-stable-81e33b51ed69d2b2eaf3fbeb043144b9d9ec7629.tar.gz linux-stable-81e33b51ed69d2b2eaf3fbeb043144b9d9ec7629.tar.bz2 linux-stable-81e33b51ed69d2b2eaf3fbeb043144b9d9ec7629.zip |
serial: xuartps: Cleanup the clock enable
The core handles the clocking now. Remove the clock disable in
suspend. In resume we enable the clocks and disable after register
write.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 7afa50b07875..a83033774382 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1352,12 +1352,7 @@ static int cdns_uart_suspend(struct device *device) * the suspend. */ uart_suspend_port(&cdns_uart_uart_driver, port); - if (console_suspend_enabled && !may_wake) { - struct cdns_uart *cdns_uart = port->private_data; - - clk_disable(cdns_uart->uartclk); - clk_disable(cdns_uart->pclk); - } else { + if (!(console_suspend_enabled && !may_wake)) { unsigned long flags = 0; spin_lock_irqsave(&port->lock, flags); @@ -1422,6 +1417,8 @@ static int cdns_uart_resume(struct device *device) ctrl_reg |= CDNS_UART_CR_TX_EN | CDNS_UART_CR_RX_EN; writel(ctrl_reg, port->membase + CDNS_UART_CR); + clk_disable(cdns_uart->uartclk); + clk_disable(cdns_uart->pclk); spin_unlock_irqrestore(&port->lock, flags); } else { spin_lock_irqsave(&port->lock, flags); |