13 #include <linux/kernel.h>
14 #include <asm/clock.h>
17 static int ifc_table[] = { 2, 4, 6, 8, 10, 12, 16, 24 };
20 #define CPRC_BLOCK_OFF 0x01010000
21 #define CPRC_BASE (PHYS_PERIPHERAL_BLOCK + CPRC_BLOCK_OFF)
23 static unsigned long cprc_base;
25 static void master_clk_init(
struct clk *
clk)
31 static struct sh_clk_ops sh5_master_clk_ops = {
32 .init = master_clk_init,
35 static unsigned long module_clk_recalc(
struct clk *
clk)
38 return clk->
parent->rate / ifc_table[
idx];
41 static struct sh_clk_ops sh5_module_clk_ops = {
42 .recalc = module_clk_recalc,
45 static unsigned long bus_clk_recalc(
struct clk *
clk)
48 return clk->
parent->rate / ifc_table[
idx];
52 .recalc = bus_clk_recalc,
55 static unsigned long cpu_clk_recalc(
struct clk *
clk)
58 return clk->
parent->rate / ifc_table[
idx];
62 .recalc = cpu_clk_recalc,
78 *ops = sh5_clk_ops[
idx];