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
c2b0a300
Commit
c2b0a300
authored
Oct 04, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] clk_* functions take frequencies in Hz not kHz
parent
a311c218
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
arch/arm/mach-integrator/clock.c
arch/arm/mach-integrator/clock.c
+6
-3
arch/arm/mach-versatile/clock.c
arch/arm/mach-versatile/clock.c
+2
-2
drivers/video/amba-clcd.c
drivers/video/amba-clcd.c
+1
-1
include/asm-arm/hardware/clock.h
include/asm-arm/hardware/clock.h
+4
-4
No files found.
arch/arm/mach-integrator/clock.c
View file @
c2b0a300
...
@@ -76,7 +76,10 @@ EXPORT_SYMBOL(clk_get_rate);
...
@@ -76,7 +76,10 @@ EXPORT_SYMBOL(clk_get_rate);
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
{
{
return
rate
;
struct
icst525_vco
vco
;
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
/
1000
);
return
icst525_khz
(
clk
->
params
,
vco
)
*
1000
;
}
}
EXPORT_SYMBOL
(
clk_round_rate
);
EXPORT_SYMBOL
(
clk_round_rate
);
...
@@ -86,8 +89,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
...
@@ -86,8 +89,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
if
(
clk
->
setvco
)
{
if
(
clk
->
setvco
)
{
struct
icst525_vco
vco
;
struct
icst525_vco
vco
;
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
);
vco
=
icst525_khz_to_vco
(
clk
->
params
,
rate
/
1000
);
clk
->
rate
=
icst525_khz
(
clk
->
params
,
vco
);
clk
->
rate
=
icst525_khz
(
clk
->
params
,
vco
)
*
1000
;
printk
(
"Clock %s: setting VCO reg params: S=%d R=%d V=%d
\n
"
,
printk
(
"Clock %s: setting VCO reg params: S=%d R=%d V=%d
\n
"
,
clk
->
name
,
vco
.
s
,
vco
.
r
,
vco
.
v
);
clk
->
name
,
vco
.
s
,
vco
.
r
,
vco
.
v
);
...
...
arch/arm/mach-versatile/clock.c
View file @
c2b0a300
...
@@ -87,8 +87,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
...
@@ -87,8 +87,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
if (clk->setvco) {
if (clk->setvco) {
struct icst525_vco vco;
struct icst525_vco vco;
vco = icst525_khz_to_vco(clk->params, rate);
vco = icst525_khz_to_vco(clk->params, rate
/ 1000
);
clk->rate = icst525_khz(clk->params, vco);
clk->rate = icst525_khz(clk->params, vco)
* 1000
;
printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n",
printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n",
clk->name, vco.s, vco.r, vco.v);
clk->name, vco.s, vco.r, vco.v);
...
...
drivers/video/amba-clcd.c
View file @
c2b0a300
...
@@ -207,7 +207,7 @@ static int clcdfb_set_par(struct fb_info *info)
...
@@ -207,7 +207,7 @@ static int clcdfb_set_par(struct fb_info *info)
clcdfb_set_start
(
fb
);
clcdfb_set_start
(
fb
);
clk_set_rate
(
fb
->
clk
,
1000000000
/
regs
.
pixclock
);
clk_set_rate
(
fb
->
clk
,
(
1000000000
/
regs
.
pixclock
)
*
1000
);
fb
->
clcd_cntl
=
regs
.
cntl
;
fb
->
clcd_cntl
=
regs
.
cntl
;
...
...
include/asm-arm/hardware/clock.h
View file @
c2b0a300
...
@@ -64,7 +64,7 @@ int clk_use(struct clk *clk);
...
@@ -64,7 +64,7 @@ int clk_use(struct clk *clk);
void
clk_unuse
(
struct
clk
*
clk
);
void
clk_unuse
(
struct
clk
*
clk
);
/**
/**
* clk_get_rate - obtain the current clock rate for a clock source.
* clk_get_rate - obtain the current clock rate
(in Hz)
for a clock source.
* This is only valid once the clock source has been enabled.
* This is only valid once the clock source has been enabled.
* @clk: clock source
* @clk: clock source
*/
*/
...
@@ -85,16 +85,16 @@ void clk_put(struct clk *clk);
...
@@ -85,16 +85,16 @@ void clk_put(struct clk *clk);
/**
/**
* clk_round_rate - adjust a rate to the exact rate a clock can provide
* clk_round_rate - adjust a rate to the exact rate a clock can provide
* @clk: clock source
* @clk: clock source
* @rate: desired clock rate in
k
Hz
* @rate: desired clock rate in Hz
*
*
* Returns rounded clock rate, or negative errno.
* Returns rounded clock rate
in Hz
, or negative errno.
*/
*/
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
/**
/**
* clk_set_rate - set the clock rate for a clock source
* clk_set_rate - set the clock rate for a clock source
* @clk: clock source
* @clk: clock source
* @rate: desired clock rate in
k
Hz
* @rate: desired clock rate in Hz
*
*
* Returns success (0) or negative errno.
* Returns success (0) or negative errno.
*/
*/
...
...
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