projects
/
linux-drm-fsl-dcu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
764f4e4
)
sh: clkfwk: Consolidate div6/div4 clk_ops definitions.
author
Paul Mundt
<lethal@linux-sh.org>
Fri, 25 May 2012 07:43:42 +0000
(16:43 +0900)
committer
Paul Mundt
<lethal@linux-sh.org>
Fri, 25 May 2012 07:43:42 +0000
(16:43 +0900)
Everything with the exception of the _reparent ops are now shared, so
switch everything over to common types.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/clk/cpg.c
patch
|
blob
|
history
diff --git
a/drivers/sh/clk/cpg.c
b/drivers/sh/clk/cpg.c
index 06537f2b2fb8a18a5d0d7735ca70f60d4a475af5..eeaec796a395a083dc1f32df3d01a699fc366165 100644
(file)
--- a/
drivers/sh/clk/cpg.c
+++ b/
drivers/sh/clk/cpg.c
@@
-148,6
+148,20
@@
static void sh_clk_div_disable(struct clk *clk)
sh_clk_write(val, clk);
}
sh_clk_write(val, clk);
}
+static struct sh_clk_ops sh_clk_div_clk_ops = {
+ .recalc = sh_clk_div_recalc,
+ .set_rate = sh_clk_div_set_rate,
+ .round_rate = sh_clk_div_round_rate,
+};
+
+static struct sh_clk_ops sh_clk_div_enable_clk_ops = {
+ .recalc = sh_clk_div_recalc,
+ .set_rate = sh_clk_div_set_rate,
+ .round_rate = sh_clk_div_round_rate,
+ .enable = sh_clk_div_enable,
+ .disable = sh_clk_div_disable,
+};
+
/*
* div6 support
*/
/*
* div6 support
*/
@@
-200,14
+214,6
@@
static int sh_clk_div6_set_parent(struct clk *clk, struct clk *parent)
return 0;
}
return 0;
}
-static struct sh_clk_ops sh_clk_div6_clk_ops = {
- .recalc = sh_clk_div_recalc,
- .round_rate = sh_clk_div_round_rate,
- .set_rate = sh_clk_div_set_rate,
- .enable = sh_clk_div_enable,
- .disable = sh_clk_div_disable,
-};
-
static struct sh_clk_ops sh_clk_div6_reparent_clk_ops = {
.recalc = sh_clk_div_recalc,
.round_rate = sh_clk_div_round_rate,
static struct sh_clk_ops sh_clk_div6_reparent_clk_ops = {
.recalc = sh_clk_div_recalc,
.round_rate = sh_clk_div_round_rate,
@@
-286,7
+292,7
@@
static int __init sh_clk_div6_register_ops(struct clk *clks, int nr,
int __init sh_clk_div6_register(struct clk *clks, int nr)
{
int __init sh_clk_div6_register(struct clk *clks, int nr)
{
- return sh_clk_div6_register_ops(clks, nr, &sh_clk_div
6
_clk_ops);
+ return sh_clk_div6_register_ops(clks, nr, &sh_clk_div
_enable
_clk_ops);
}
int __init sh_clk_div6_reparent_register(struct clk *clks, int nr)
}
int __init sh_clk_div6_reparent_register(struct clk *clks, int nr)
@@
-327,20
+333,6
@@
static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
return 0;
}
return 0;
}
-static struct sh_clk_ops sh_clk_div4_clk_ops = {
- .recalc = sh_clk_div_recalc,
- .set_rate = sh_clk_div_set_rate,
- .round_rate = sh_clk_div_round_rate,
-};
-
-static struct sh_clk_ops sh_clk_div4_enable_clk_ops = {
- .recalc = sh_clk_div_recalc,
- .set_rate = sh_clk_div_set_rate,
- .round_rate = sh_clk_div_round_rate,
- .enable = sh_clk_div_enable,
- .disable = sh_clk_div_disable,
-};
-
static struct sh_clk_ops sh_clk_div4_reparent_clk_ops = {
.recalc = sh_clk_div_recalc,
.set_rate = sh_clk_div_set_rate,
static struct sh_clk_ops sh_clk_div4_reparent_clk_ops = {
.recalc = sh_clk_div_recalc,
.set_rate = sh_clk_div_set_rate,
@@
-385,14
+377,14
@@
static int __init sh_clk_div4_register_ops(struct clk *clks, int nr,
int __init sh_clk_div4_register(struct clk *clks, int nr,
struct clk_div4_table *table)
{
int __init sh_clk_div4_register(struct clk *clks, int nr,
struct clk_div4_table *table)
{
- return sh_clk_div4_register_ops(clks, nr, table, &sh_clk_div
4
_clk_ops);
+ return sh_clk_div4_register_ops(clks, nr, table, &sh_clk_div_clk_ops);
}
int __init sh_clk_div4_enable_register(struct clk *clks, int nr,
struct clk_div4_table *table)
{
return sh_clk_div4_register_ops(clks, nr, table,
}
int __init sh_clk_div4_enable_register(struct clk *clks, int nr,
struct clk_div4_table *table)
{
return sh_clk_div4_register_ops(clks, nr, table,
- &sh_clk_div
4
_enable_clk_ops);
+ &sh_clk_div_enable_clk_ops);
}
int __init sh_clk_div4_reparent_register(struct clk *clks, int nr,
}
int __init sh_clk_div4_reparent_register(struct clk *clks, int nr,