aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-15 20:11:20 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-15 20:11:20 -0500
commit849653372d3f98332bf84e9fb814d9f9a02eeda2 (patch)
tree0ccb6899ceb664024cc98ddfdf4b55572c45ec32 /drivers/sh
parent6800e4c0ea3e96cf78953b8b5743381cb1bb9e37 (diff)
parent549015c36baadc6e67861bba6e927259e34c4d59 (diff)
Merge branch 'common/clkfwk' into sh-fixes-for-linus
Diffstat (limited to 'drivers/sh')
-rw-r--r--drivers/sh/clk/core.c13
-rw-r--r--drivers/sh/clk/cpg.c5
2 files changed, 5 insertions, 13 deletions
diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c
index cb12a8e1466b..87743e7d4d42 100644
--- a/drivers/sh/clk/core.c
+++ b/drivers/sh/clk/core.c
@@ -455,19 +455,13 @@ EXPORT_SYMBOL_GPL(clk_get_rate);
455 455
456int clk_set_rate(struct clk *clk, unsigned long rate) 456int clk_set_rate(struct clk *clk, unsigned long rate)
457{ 457{
458 return clk_set_rate_ex(clk, rate, 0);
459}
460EXPORT_SYMBOL_GPL(clk_set_rate);
461
462int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
463{
464 int ret = -EOPNOTSUPP; 458 int ret = -EOPNOTSUPP;
465 unsigned long flags; 459 unsigned long flags;
466 460
467 spin_lock_irqsave(&clock_lock, flags); 461 spin_lock_irqsave(&clock_lock, flags);
468 462
469 if (likely(clk->ops && clk->ops->set_rate)) { 463 if (likely(clk->ops && clk->ops->set_rate)) {
470 ret = clk->ops->set_rate(clk, rate, algo_id); 464 ret = clk->ops->set_rate(clk, rate);
471 if (ret != 0) 465 if (ret != 0)
472 goto out_unlock; 466 goto out_unlock;
473 } else { 467 } else {
@@ -485,7 +479,7 @@ out_unlock:
485 479
486 return ret; 480 return ret;
487} 481}
488EXPORT_SYMBOL_GPL(clk_set_rate_ex); 482EXPORT_SYMBOL_GPL(clk_set_rate);
489 483
490int clk_set_parent(struct clk *clk, struct clk *parent) 484int clk_set_parent(struct clk *clk, struct clk *parent)
491{ 485{
@@ -653,8 +647,7 @@ static int clks_sysdev_suspend(struct sys_device *dev, pm_message_t state)
653 clkp->ops->set_parent(clkp, 647 clkp->ops->set_parent(clkp,
654 clkp->parent); 648 clkp->parent);
655 if (likely(clkp->ops->set_rate)) 649 if (likely(clkp->ops->set_rate))
656 clkp->ops->set_rate(clkp, 650 clkp->ops->set_rate(clkp, rate);
657 rate, NO_CHANGE);
658 else if (likely(clkp->ops->recalc)) 651 else if (likely(clkp->ops->recalc))
659 clkp->rate = clkp->ops->recalc(clkp); 652 clkp->rate = clkp->ops->recalc(clkp);
660 } 653 }
diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
index 3aea5f0ceb09..359e9a322c7b 100644
--- a/drivers/sh/clk/cpg.c
+++ b/drivers/sh/clk/cpg.c
@@ -110,8 +110,7 @@ static int sh_clk_div6_set_parent(struct clk *clk, struct clk *parent)
110 return 0; 110 return 0;
111} 111}
112 112
113static int sh_clk_div6_set_rate(struct clk *clk, 113static int sh_clk_div6_set_rate(struct clk *clk, unsigned long rate)
114 unsigned long rate, int algo_id)
115{ 114{
116 unsigned long value; 115 unsigned long value;
117 int idx; 116 int idx;
@@ -253,7 +252,7 @@ static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
253 return 0; 252 return 0;
254} 253}
255 254
256static int sh_clk_div4_set_rate(struct clk *clk, unsigned long rate, int algo_id) 255static int sh_clk_div4_set_rate(struct clk *clk, unsigned long rate)
257{ 256{
258 struct clk_div4_table *d4t = clk->priv; 257 struct clk_div4_table *d4t = clk->priv;
259 unsigned long value; 258 unsigned long value;