aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/mxs-auart.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-12-20 01:10:29 -0500
committerShawn Guo <shawn.guo@linaro.org>2011-12-28 08:30:48 -0500
commita481377013c1c07dac0421886db7a6b4c3081c49 (patch)
tree3cef0449d1b82fa101eafe77807e64d962176b64 /drivers/tty/serial/mxs-auart.c
parente735489976c356a189f7332e6ff4b0dee2ede434 (diff)
serial: mxs-auart: convert to clk_prepare/clk_unprepare
The patch converts mxs-auart driver to clk_prepare/clk_unprepare by using helper functions clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Alan Cox <alan@linux.intel.com>
Diffstat (limited to 'drivers/tty/serial/mxs-auart.c')
-rw-r--r--drivers/tty/serial/mxs-auart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 7e02c9c344fe..c33500a5e032 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -424,7 +424,7 @@ static int mxs_auart_startup(struct uart_port *u)
424{ 424{
425 struct mxs_auart_port *s = to_auart_port(u); 425 struct mxs_auart_port *s = to_auart_port(u);
426 426
427 clk_enable(s->clk); 427 clk_prepare_enable(s->clk);
428 428
429 writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTRL0_CLR); 429 writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTRL0_CLR);
430 430
@@ -453,7 +453,7 @@ static void mxs_auart_shutdown(struct uart_port *u)
453 writel(AUART_INTR_RXIEN | AUART_INTR_RTIEN | AUART_INTR_CTSMIEN, 453 writel(AUART_INTR_RXIEN | AUART_INTR_RTIEN | AUART_INTR_CTSMIEN,
454 u->membase + AUART_INTR_CLR); 454 u->membase + AUART_INTR_CLR);
455 455
456 clk_disable(s->clk); 456 clk_disable_unprepare(s->clk);
457} 457}
458 458
459static unsigned int mxs_auart_tx_empty(struct uart_port *u) 459static unsigned int mxs_auart_tx_empty(struct uart_port *u)
@@ -634,7 +634,7 @@ auart_console_setup(struct console *co, char *options)
634 if (!s) 634 if (!s)
635 return -ENODEV; 635 return -ENODEV;
636 636
637 clk_enable(s->clk); 637 clk_prepare_enable(s->clk);
638 638
639 if (options) 639 if (options)
640 uart_parse_options(options, &baud, &parity, &bits, &flow); 640 uart_parse_options(options, &baud, &parity, &bits, &flow);
@@ -643,7 +643,7 @@ auart_console_setup(struct console *co, char *options)
643 643
644 ret = uart_set_options(&s->port, co, baud, parity, bits, flow); 644 ret = uart_set_options(&s->port, co, baud, parity, bits, flow);
645 645
646 clk_disable(s->clk); 646 clk_disable_unprepare(s->clk);
647 647
648 return ret; 648 return ret;
649} 649}