14 #include <linux/kernel.h>
17 #include <asm/clock.h>
22 static int p0fc_divisors[] = { 1, 1, 1, 8, 1, 1, 1, 1 };
23 static int cfc_divisors[] = { 1, 1, 4, 1, 1, 1, 1, 1 };
25 static void master_clk_init(
struct clk *
clk)
30 static struct sh_clk_ops sh7763_master_clk_ops = {
31 .init = master_clk_init,
34 static unsigned long module_clk_recalc(
struct clk *
clk)
37 return clk->
parent->rate / p0fc_divisors[
idx];
40 static struct sh_clk_ops sh7763_module_clk_ops = {
41 .recalc = module_clk_recalc,
44 static unsigned long bus_clk_recalc(
struct clk *
clk)
50 static struct sh_clk_ops sh7763_bus_clk_ops = {
51 .recalc = bus_clk_recalc,
54 static struct sh_clk_ops sh7763_cpu_clk_ops = {
59 &sh7763_master_clk_ops,
60 &sh7763_module_clk_ops,
68 *ops = sh7763_clk_ops[
idx];
71 static unsigned long shyway_clk_recalc(
struct clk *
clk)
74 return clk->
parent->rate / cfc_divisors[
idx];
77 static struct sh_clk_ops sh7763_shyway_clk_ops = {
78 .recalc = shyway_clk_recalc,
81 static struct clk sh7763_shyway_clk = {
83 .ops = &sh7763_shyway_clk_ops,
90 static struct clk *sh7763_onchip_clocks[] = {
107 for (i = 0; i <
ARRAY_SIZE(sh7763_onchip_clocks); i++) {
108 struct clk *clkp = sh7763_onchip_clocks[
i];