diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7724.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c index 9db743802f06..6707061fbf54 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c | |||
@@ -127,13 +127,28 @@ struct clk *main_clks[] = { | |||
127 | &div3_clk, | 127 | &div3_clk, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static void div4_kick(struct clk *clk) | ||
131 | { | ||
132 | unsigned long value; | ||
133 | |||
134 | /* set KICK bit in FRQCRA to update hardware setting */ | ||
135 | value = __raw_readl(FRQCRA); | ||
136 | value |= (1 << 31); | ||
137 | __raw_writel(value, FRQCRA); | ||
138 | } | ||
139 | |||
130 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 0, 24, 32, 36, 48, 0, 72 }; | 140 | static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 0, 24, 32, 36, 48, 0, 72 }; |
131 | 141 | ||
132 | static struct clk_div_mult_table div4_table = { | 142 | static struct clk_div_mult_table div4_div_mult_table = { |
133 | .divisors = divisors, | 143 | .divisors = divisors, |
134 | .nr_divisors = ARRAY_SIZE(divisors), | 144 | .nr_divisors = ARRAY_SIZE(divisors), |
135 | }; | 145 | }; |
136 | 146 | ||
147 | static struct clk_div4_table div4_table = { | ||
148 | .div_mult_table = &div4_div_mult_table, | ||
149 | .kick = div4_kick, | ||
150 | }; | ||
151 | |||
137 | enum { DIV4_I, DIV4_SH, DIV4_B, DIV4_P, DIV4_M1, DIV4_NR }; | 152 | enum { DIV4_I, DIV4_SH, DIV4_B, DIV4_P, DIV4_M1, DIV4_NR }; |
138 | 153 | ||
139 | #define DIV4(_str, _reg, _bit, _mask, _flags) \ | 154 | #define DIV4(_str, _reg, _bit, _mask, _flags) \ |
@@ -144,7 +159,7 @@ struct clk div4_clks[DIV4_NR] = { | |||
144 | [DIV4_SH] = DIV4("shyway_clk", FRQCRA, 12, 0x2f7c, CLK_ENABLE_ON_INIT), | 159 | [DIV4_SH] = DIV4("shyway_clk", FRQCRA, 12, 0x2f7c, CLK_ENABLE_ON_INIT), |
145 | [DIV4_B] = DIV4("bus_clk", FRQCRA, 8, 0x2f7c, CLK_ENABLE_ON_INIT), | 160 | [DIV4_B] = DIV4("bus_clk", FRQCRA, 8, 0x2f7c, CLK_ENABLE_ON_INIT), |
146 | [DIV4_P] = DIV4("peripheral_clk", FRQCRA, 0, 0x2f7c, 0), | 161 | [DIV4_P] = DIV4("peripheral_clk", FRQCRA, 0, 0x2f7c, 0), |
147 | [DIV4_M1] = DIV4("vpu_clk", FRQCRB, 4, 0x2f7c, 0), | 162 | [DIV4_M1] = DIV4("vpu_clk", FRQCRB, 4, 0x2f7c, CLK_ENABLE_ON_INIT), |
148 | }; | 163 | }; |
149 | 164 | ||
150 | struct clk div6_clks[] = { | 165 | struct clk div6_clks[] = { |