20 #include <linux/kernel.h>
21 #include <asm/clock.h>
29 static int stc_multipliers[] = { 1, 2, 3, 4, 6, 1, 1, 1 };
31 static int pfc_divisors[] = { 1, 2, 3, 4, 6, 1, 1, 1 };
33 static void master_clk_init(
struct clk *
clk)
38 static struct sh_clk_ops sh7705_master_clk_ops = {
39 .init = master_clk_init,
42 static unsigned long module_clk_recalc(
struct clk *
clk)
45 return clk->
parent->rate / pfc_divisors[
idx];
48 static struct sh_clk_ops sh7705_module_clk_ops = {
49 .recalc = module_clk_recalc,
52 static unsigned long bus_clk_recalc(
struct clk *
clk)
55 return clk->
parent->rate / stc_multipliers[
idx];
58 static struct sh_clk_ops sh7705_bus_clk_ops = {
59 .recalc = bus_clk_recalc,
62 static unsigned long cpu_clk_recalc(
struct clk *
clk)
68 static struct sh_clk_ops sh7705_cpu_clk_ops = {
69 .recalc = cpu_clk_recalc,
73 &sh7705_master_clk_ops,
74 &sh7705_module_clk_ops,
82 *ops = sh7705_clk_ops[
idx];