diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-11 14:50:44 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-11 14:50:44 -0400 |
commit | a02cb230bb4fca04f091746c593de720a0e3a94a (patch) | |
tree | b492976b4a4ee701c93fa12882510ddd41e2a26c /arch/sh/kernel/cpu/sh4a | |
parent | b68d8201433a91cabbcbeae48b53d8c1c426433a (diff) |
sh: clkfwk: Add a followparent_recalc() helper.
This adds a followparent_recalc() helper for clocks that just follow the
parent's rate. Switch over the few CPUs that use this scheme for some of
their clocks.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 7 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7763.c | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c index 5b1427f1ed41..4bdae84aa6b0 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c | |||
@@ -646,15 +646,10 @@ static void sh7722_mstpcr_disable(struct clk *clk) | |||
646 | sh7722_mstpcr_start_stop(clk, 0); | 646 | sh7722_mstpcr_start_stop(clk, 0); |
647 | } | 647 | } |
648 | 648 | ||
649 | static unsigned long sh7722_mstpcr_recalc(struct clk *clk) | ||
650 | { | ||
651 | return clk->parent->rate; | ||
652 | } | ||
653 | |||
654 | static struct clk_ops sh7722_mstpcr_clk_ops = { | 649 | static struct clk_ops sh7722_mstpcr_clk_ops = { |
655 | .enable = sh7722_mstpcr_enable, | 650 | .enable = sh7722_mstpcr_enable, |
656 | .disable = sh7722_mstpcr_disable, | 651 | .disable = sh7722_mstpcr_disable, |
657 | .recalc = sh7722_mstpcr_recalc, | 652 | .recalc = followparent_recalc, |
658 | }; | 653 | }; |
659 | 654 | ||
660 | #define MSTPCR(_name, _parent, regnr, bitnr) \ | 655 | #define MSTPCR(_name, _parent, regnr, bitnr) \ |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c index 26630fb190c7..db51cffc5d5b 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7763.c | |||
@@ -49,13 +49,8 @@ static struct clk_ops sh7763_bus_clk_ops = { | |||
49 | .recalc = bus_clk_recalc, | 49 | .recalc = bus_clk_recalc, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static unsigned long cpu_clk_recalc(struct clk *clk) | ||
53 | { | ||
54 | return clk->parent->rate; | ||
55 | } | ||
56 | |||
57 | static struct clk_ops sh7763_cpu_clk_ops = { | 52 | static struct clk_ops sh7763_cpu_clk_ops = { |
58 | .recalc = cpu_clk_recalc, | 53 | .recalc = followparent_recalc, |
59 | }; | 54 | }; |
60 | 55 | ||
61 | static struct clk_ops *sh7763_clk_ops[] = { | 56 | static struct clk_ops *sh7763_clk_ops[] = { |