aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7785.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7785.c24
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
36static void module_clk_recalc(struct clk *clk) 36static 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
42static struct clk_ops sh7785_module_clk_ops = { 42static struct clk_ops sh7785_module_clk_ops = {
43 .recalc = module_clk_recalc, 43 .recalc = module_clk_recalc,
44}; 44};
45 45
46static void bus_clk_recalc(struct clk *clk) 46static 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
52static struct clk_ops sh7785_bus_clk_ops = { 52static struct clk_ops sh7785_bus_clk_ops = {
53 .recalc = bus_clk_recalc, 53 .recalc = bus_clk_recalc,
54}; 54};
55 55
56static void cpu_clk_recalc(struct clk *clk) 56static 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
62static struct clk_ops sh7785_cpu_clk_ops = { 62static 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
79static void shyway_clk_recalc(struct clk *clk) 79static 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
85static struct clk_ops sh7785_shyway_clk_ops = { 85static 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
95static void ddr_clk_recalc(struct clk *clk) 95static 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
101static struct clk_ops sh7785_ddr_clk_ops = { 101static 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
111static void ram_clk_recalc(struct clk *clk) 111static 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
117static struct clk_ops sh7785_ram_clk_ops = { 117static struct clk_ops sh7785_ram_clk_ops = {