mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
msm_serial: Convert to clk_prepare/unprepare
Add calls to clk_prepare and unprepare so that MSM can migrate to the common clock framework. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Brown <davidb@codeaurora.org>
This commit is contained in:
parent
f722406faa
commit
f98cf83d0c
@ -408,9 +408,9 @@ static void msm_init_clock(struct uart_port *port)
|
||||
{
|
||||
struct msm_port *msm_port = UART_TO_MSM(port);
|
||||
|
||||
clk_enable(msm_port->clk);
|
||||
clk_prepare_enable(msm_port->clk);
|
||||
if (!IS_ERR(msm_port->pclk))
|
||||
clk_enable(msm_port->pclk);
|
||||
clk_prepare_enable(msm_port->pclk);
|
||||
msm_serial_set_mnd_regs(port);
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ static void msm_shutdown(struct uart_port *port)
|
||||
msm_port->imr = 0;
|
||||
msm_write(port, 0, UART_IMR); /* disable interrupts */
|
||||
|
||||
clk_disable(msm_port->clk);
|
||||
clk_disable_unprepare(msm_port->clk);
|
||||
|
||||
free_irq(port->irq, port);
|
||||
}
|
||||
@ -688,14 +688,14 @@ static void msm_power(struct uart_port *port, unsigned int state,
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
clk_enable(msm_port->clk);
|
||||
clk_prepare_enable(msm_port->clk);
|
||||
if (!IS_ERR(msm_port->pclk))
|
||||
clk_enable(msm_port->pclk);
|
||||
clk_prepare_enable(msm_port->pclk);
|
||||
break;
|
||||
case 3:
|
||||
clk_disable(msm_port->clk);
|
||||
clk_disable_unprepare(msm_port->clk);
|
||||
if (!IS_ERR(msm_port->pclk))
|
||||
clk_disable(msm_port->pclk);
|
||||
clk_disable_unprepare(msm_port->pclk);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "msm_serial: Unknown PM state %d\n", state);
|
||||
|
Loading…
Reference in New Issue
Block a user