13 #include <linux/kernel.h>
16 #include <asm/clock.h>
19 #define FRQCR 0xfffe0010
20 #define STBCR3 0xfffe0408
21 #define STBCR4 0xfffe040c
22 #define STBCR5 0xfffe0410
23 #define STBCR6 0xfffe0414
24 #define STBCR7 0xfffe0418
29 static struct clk r_clk = {
37 static struct clk extal_clk = {
41 static unsigned long pll_recalc(
struct clk *
clk)
50 static struct clk pll_clk = {
56 static unsigned long peripheral0_recalc(
struct clk *
clk)
58 return clk->
parent->rate / 8;
61 static struct sh_clk_ops peripheral0_clk_ops = {
62 .recalc = peripheral0_recalc,
65 static struct clk peripheral0_clk = {
66 .ops = &peripheral0_clk_ops,
71 static unsigned long peripheral1_recalc(
struct clk *
clk)
73 return clk->
parent->rate / 4;
76 static struct sh_clk_ops peripheral1_clk_ops = {
77 .recalc = peripheral1_recalc,
80 static struct clk peripheral1_clk = {
81 .ops = &peripheral1_clk_ops,
94 static int div2[] = { 1, 2, 0, 4 };
102 .div_mult_table = &div4_div_mult_table,
108 #define DIV4(_reg, _bit, _mask, _flags) \
109 SH_CLK_DIV4(&pll_clk, _reg, _bit, _mask, _flags)
172 for (k = 0; !ret && (k <
ARRAY_SIZE(main_clks)); k++)