sh: clkfwk: Make recalc return an unsigned long.
[linux-2.6-block.git] / arch / sh / kernel / cpu / sh3 / clock-sh7709.c
index b791a29fdb6245773c045eb55ab5e39e2e830e79..fa30b601773040d6246071e3dce54fdc1abaad61 100644 (file)
@@ -41,12 +41,12 @@ static struct clk_ops sh7709_master_clk_ops = {
        .init           = master_clk_init,
 };
 
-static void module_clk_recalc(struct clk *clk)
+static unsigned long module_clk_recalc(struct clk *clk)
 {
        int frqcr = ctrl_inw(FRQCR);
        int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003);
 
-       clk->rate = clk->parent->rate / pfc_divisors[idx];
+       return clk->parent->rate / pfc_divisors[idx];
 }
 
 static struct clk_ops sh7709_module_clk_ops = {
@@ -56,25 +56,25 @@ static struct clk_ops sh7709_module_clk_ops = {
        .recalc         = module_clk_recalc,
 };
 
-static void bus_clk_recalc(struct clk *clk)
+static unsigned long bus_clk_recalc(struct clk *clk)
 {
        int frqcr = ctrl_inw(FRQCR);
        int idx = (frqcr & 0x0080) ?
                ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1;
 
-       clk->rate = clk->parent->rate * stc_multipliers[idx];
+       return clk->parent->rate * stc_multipliers[idx];
 }
 
 static struct clk_ops sh7709_bus_clk_ops = {
        .recalc         = bus_clk_recalc,
 };
 
-static void cpu_clk_recalc(struct clk *clk)
+static unsigned long cpu_clk_recalc(struct clk *clk)
 {
        int frqcr = ctrl_inw(FRQCR);
        int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2);
 
-       clk->rate = clk->parent->rate / ifc_divisors[idx];
+       return clk->parent->rate / ifc_divisors[idx];
 }
 
 static struct clk_ops sh7709_cpu_clk_ops = {