diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-11 14:45:08 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-11 14:45:08 -0400 |
commit | b68d8201433a91cabbcbeae48b53d8c1c426433a (patch) | |
tree | fed76b13249a01356509c0860260434216352f8c /arch/sh/kernel/cpu/sh3/clock-sh7709.c | |
parent | ccc195655fb25d7d967b278c4a4725dc5e7a6bf4 (diff) |
sh: clkfwk: Make recalc return an unsigned long.
This is prep work for cleaning up some of the rate propagation bits.
Trivial conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh3/clock-sh7709.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh3/clock-sh7709.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7709.c b/arch/sh/kernel/cpu/sh3/clock-sh7709.c index b791a29fdb62..fa30b6017730 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7709.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7709.c | |||
@@ -41,12 +41,12 @@ static struct clk_ops sh7709_master_clk_ops = { | |||
41 | .init = master_clk_init, | 41 | .init = master_clk_init, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static void module_clk_recalc(struct clk *clk) | 44 | static unsigned long module_clk_recalc(struct clk *clk) |
45 | { | 45 | { |
46 | int frqcr = ctrl_inw(FRQCR); | 46 | int frqcr = ctrl_inw(FRQCR); |
47 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | 47 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); |
48 | 48 | ||
49 | clk->rate = clk->parent->rate / pfc_divisors[idx]; | 49 | return clk->parent->rate / pfc_divisors[idx]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static struct clk_ops sh7709_module_clk_ops = { | 52 | static struct clk_ops sh7709_module_clk_ops = { |
@@ -56,25 +56,25 @@ static struct clk_ops sh7709_module_clk_ops = { | |||
56 | .recalc = module_clk_recalc, | 56 | .recalc = module_clk_recalc, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static void bus_clk_recalc(struct clk *clk) | 59 | static unsigned long bus_clk_recalc(struct clk *clk) |
60 | { | 60 | { |
61 | int frqcr = ctrl_inw(FRQCR); | 61 | int frqcr = ctrl_inw(FRQCR); |
62 | int idx = (frqcr & 0x0080) ? | 62 | int idx = (frqcr & 0x0080) ? |
63 | ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1; | 63 | ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1; |
64 | 64 | ||
65 | clk->rate = clk->parent->rate * stc_multipliers[idx]; | 65 | return clk->parent->rate * stc_multipliers[idx]; |
66 | } | 66 | } |
67 | 67 | ||
68 | static struct clk_ops sh7709_bus_clk_ops = { | 68 | static struct clk_ops sh7709_bus_clk_ops = { |
69 | .recalc = bus_clk_recalc, | 69 | .recalc = bus_clk_recalc, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static void cpu_clk_recalc(struct clk *clk) | 72 | static unsigned long cpu_clk_recalc(struct clk *clk) |
73 | { | 73 | { |
74 | int frqcr = ctrl_inw(FRQCR); | 74 | int frqcr = ctrl_inw(FRQCR); |
75 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); | 75 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); |
76 | 76 | ||
77 | clk->rate = clk->parent->rate / ifc_divisors[idx]; | 77 | return clk->parent->rate / ifc_divisors[idx]; |
78 | } | 78 | } |
79 | 79 | ||
80 | static struct clk_ops sh7709_cpu_clk_ops = { | 80 | static struct clk_ops sh7709_cpu_clk_ops = { |