* [PATCH] serial: pxa: add clk_prepare/clk_unprepare calls
@ 2012-03-15 18:15 Philipp Zabel
0 siblings, 0 replies; only message in thread
From: Philipp Zabel @ 2012-03-15 18:15 UTC (permalink / raw)
To: linux-serial; +Cc: Haojian Zhuang, Eric Miao, Alan Cox, GregKroah-Hartman
This patch adds clk_prepare/clk_unprepare calls to the serial/pxa
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/pxa.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 5c8e3bb..e2fd3d8 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -579,9 +579,9 @@ serial_pxa_pm(struct uart_port *port, unsigned int state,
struct uart_pxa_port *up = (struct uart_pxa_port *)port;
if (!state)
- clk_enable(up->clk);
+ clk_prepare_enable(up->clk);
else
- clk_disable(up->clk);
+ clk_disable_unprepare(up->clk);
}
static void serial_pxa_release_port(struct uart_port *port)
@@ -668,7 +668,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
struct uart_pxa_port *up = serial_pxa_ports[co->index];
unsigned int ier;
- clk_enable(up->clk);
+ clk_prepare_enable(up->clk);
/*
* First save the IER then disable the interrupts
@@ -685,7 +685,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
wait_for_xmitr(up);
serial_out(up, UART_IER, ier);
- clk_disable(up->clk);
+ clk_disable_unprepare(up->clk);
}
static int __init
--
1.7.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-15 18:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 18:15 [PATCH] serial: pxa: add clk_prepare/clk_unprepare calls Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox