diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7785.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c index 27fa81bef6a0..52691eaeb9ba 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c | |||
@@ -33,30 +33,30 @@ static struct clk_ops sh7785_master_clk_ops = { | |||
33 | .init = master_clk_init, | 33 | .init = master_clk_init, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | static void module_clk_recalc(struct clk *clk) | 36 | static unsigned long module_clk_recalc(struct clk *clk) |
37 | { | 37 | { |
38 | int idx = (ctrl_inl(FRQMR1) & 0x000f); | 38 | int idx = (ctrl_inl(FRQMR1) & 0x000f); |
39 | clk->rate = clk->parent->rate / pfc_divisors[idx]; | 39 | return clk->parent->rate / pfc_divisors[idx]; |
40 | } | 40 | } |
41 | 41 | ||
42 | static struct clk_ops sh7785_module_clk_ops = { | 42 | static struct clk_ops sh7785_module_clk_ops = { |
43 | .recalc = module_clk_recalc, | 43 | .recalc = module_clk_recalc, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static void bus_clk_recalc(struct clk *clk) | 46 | static unsigned long bus_clk_recalc(struct clk *clk) |
47 | { | 47 | { |
48 | int idx = ((ctrl_inl(FRQMR1) >> 16) & 0x000f); | 48 | int idx = ((ctrl_inl(FRQMR1) >> 16) & 0x000f); |
49 | clk->rate = clk->parent->rate / bfc_divisors[idx]; | 49 | return clk->parent->rate / bfc_divisors[idx]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static struct clk_ops sh7785_bus_clk_ops = { | 52 | static struct clk_ops sh7785_bus_clk_ops = { |
53 | .recalc = bus_clk_recalc, | 53 | .recalc = bus_clk_recalc, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | static void cpu_clk_recalc(struct clk *clk) | 56 | static unsigned long cpu_clk_recalc(struct clk *clk) |
57 | { | 57 | { |
58 | int idx = ((ctrl_inl(FRQMR1) >> 28) & 0x0003); | 58 | int idx = ((ctrl_inl(FRQMR1) >> 28) & 0x0003); |
59 | clk->rate = clk->parent->rate / ifc_divisors[idx]; | 59 | return clk->parent->rate / ifc_divisors[idx]; |
60 | } | 60 | } |
61 | 61 | ||
62 | static struct clk_ops sh7785_cpu_clk_ops = { | 62 | static struct clk_ops sh7785_cpu_clk_ops = { |
@@ -76,10 +76,10 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | |||
76 | *ops = sh7785_clk_ops[idx]; | 76 | *ops = sh7785_clk_ops[idx]; |
77 | } | 77 | } |
78 | 78 | ||
79 | static void shyway_clk_recalc(struct clk *clk) | 79 | static unsigned long shyway_clk_recalc(struct clk *clk) |
80 | { | 80 | { |
81 | int idx = ((ctrl_inl(FRQMR1) >> 20) & 0x0003); | 81 | int idx = ((ctrl_inl(FRQMR1) >> 20) & 0x0003); |
82 | clk->rate = clk->parent->rate / sfc_divisors[idx]; | 82 | return clk->parent->rate / sfc_divisors[idx]; |
83 | } | 83 | } |
84 | 84 | ||
85 | static struct clk_ops sh7785_shyway_clk_ops = { | 85 | static struct clk_ops sh7785_shyway_clk_ops = { |
@@ -92,10 +92,10 @@ static struct clk sh7785_shyway_clk = { | |||
92 | .ops = &sh7785_shyway_clk_ops, | 92 | .ops = &sh7785_shyway_clk_ops, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static void ddr_clk_recalc(struct clk *clk) | 95 | static unsigned long ddr_clk_recalc(struct clk *clk) |
96 | { | 96 | { |
97 | int idx = ((ctrl_inl(FRQMR1) >> 12) & 0x0003); | 97 | int idx = ((ctrl_inl(FRQMR1) >> 12) & 0x0003); |
98 | clk->rate = clk->parent->rate / mfc_divisors[idx]; | 98 | return clk->parent->rate / mfc_divisors[idx]; |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct clk_ops sh7785_ddr_clk_ops = { | 101 | static struct clk_ops sh7785_ddr_clk_ops = { |
@@ -108,10 +108,10 @@ static struct clk sh7785_ddr_clk = { | |||
108 | .ops = &sh7785_ddr_clk_ops, | 108 | .ops = &sh7785_ddr_clk_ops, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static void ram_clk_recalc(struct clk *clk) | 111 | static unsigned long ram_clk_recalc(struct clk *clk) |
112 | { | 112 | { |
113 | int idx = ((ctrl_inl(FRQMR1) >> 24) & 0x0003); | 113 | int idx = ((ctrl_inl(FRQMR1) >> 24) & 0x0003); |
114 | clk->rate = clk->parent->rate / ufc_divisors[idx]; | 114 | return clk->parent->rate / ufc_divisors[idx]; |
115 | } | 115 | } |
116 | 116 | ||
117 | static struct clk_ops sh7785_ram_clk_ops = { | 117 | static struct clk_ops sh7785_ram_clk_ops = { |