Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269437
b: refs/heads/master
c: 4b4851c
h: refs/heads/master
i:
  269435: 8c6b78d
v: v3
  • Loading branch information
Russell King committed Sep 27, 2011
1 parent 3edd09e commit 5f0b889
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36b8f1e2dc8d0da4571788053af70f1f45d96ecf
refs/heads/master: 4b4851c65d926f46e208e4731409022d986a1355
14 changes: 13 additions & 1 deletion trunk/drivers/tty/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,12 +1367,16 @@ static int pl011_startup(struct uart_port *port)
unsigned int cr;
int retval;

retval = clk_prepare(uap->clk);
if (retval)
goto out;

/*
* Try to enable the clock producer.
*/
retval = clk_enable(uap->clk);
if (retval)
goto out;
goto clk_unprep;

uap->port.uartclk = clk_get_rate(uap->clk);

Expand Down Expand Up @@ -1446,6 +1450,8 @@ static int pl011_startup(struct uart_port *port)

clk_dis:
clk_disable(uap->clk);
clk_unprep:
clk_unprepare(uap->clk);
out:
return retval;
}
Expand Down Expand Up @@ -1497,6 +1503,7 @@ static void pl011_shutdown(struct uart_port *port)
* Shut down the clock producer
*/
clk_disable(uap->clk);
clk_unprepare(uap->clk);

if (uap->port.dev->platform_data) {
struct amba_pl011_data *plat;
Expand Down Expand Up @@ -1800,6 +1807,7 @@ static int __init pl011_console_setup(struct console *co, char *options)
int bits = 8;
int parity = 'n';
int flow = 'n';
int ret;

/*
* Check whether an invalid uart number has been specified, and
Expand All @@ -1812,6 +1820,10 @@ static int __init pl011_console_setup(struct console *co, char *options)
if (!uap)
return -ENODEV;

ret = clk_prepare(uap->clk);
if (ret)
return ret;

if (uap->port.dev->platform_data) {
struct amba_pl011_data *plat;

Expand Down

0 comments on commit 5f0b889

Please sign in to comment.