Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
36b8f1e2
Commit
36b8f1e2
authored
Sep 22, 2011
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clk: amba-pl010: convert to clk_prepare()/clk_unprepare()
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
99df4ee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
drivers/tty/serial/amba-pl010.c
drivers/tty/serial/amba-pl010.c
+13
-1
No files found.
drivers/tty/serial/amba-pl010.c
View file @
36b8f1e2
...
...
@@ -312,12 +312,16 @@ static int pl010_startup(struct uart_port *port)
struct
uart_amba_port
*
uap
=
(
struct
uart_amba_port
*
)
port
;
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
);
...
...
@@ -343,6 +347,8 @@ static int pl010_startup(struct uart_port *port)
clk_dis:
clk_disable
(
uap
->
clk
);
clk_unprep:
clk_unprepare
(
uap
->
clk
);
out:
return
retval
;
}
...
...
@@ -370,6 +376,7 @@ static void pl010_shutdown(struct uart_port *port)
* Shut down the clock producer
*/
clk_disable
(
uap
->
clk
);
clk_unprepare
(
uap
->
clk
);
}
static
void
...
...
@@ -626,6 +633,7 @@ static int __init pl010_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
...
...
@@ -638,6 +646,10 @@ static int __init pl010_console_setup(struct console *co, char *options)
if
(
!
uap
)
return
-
ENODEV
;
ret
=
clk_prepare
(
uap
->
clk
);
if
(
ret
)
return
ret
;
uap
->
port
.
uartclk
=
clk_get_rate
(
uap
->
clk
);
if
(
options
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment