diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7723.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7723.c | 105 |
1 files changed, 49 insertions, 56 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c index 36e17dc27b0a..b4331854f57b 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c | |||
@@ -153,64 +153,57 @@ struct clk div6_clks[] = { | |||
153 | SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0), | 153 | SH_CLK_DIV6("video_clk", &pll_clk, VCLKCR, 0), |
154 | }; | 154 | }; |
155 | 155 | ||
156 | #define R_CLK (&r_clk) | ||
157 | #define P_CLK (&div4_clks[DIV4_P]) | ||
158 | #define B_CLK (&div4_clks[DIV4_B]) | ||
159 | #define U_CLK (&div4_clks[DIV4_U]) | ||
160 | #define I_CLK (&div4_clks[DIV4_I]) | ||
161 | #define SH_CLK (&div4_clks[DIV4_SH]) | ||
162 | |||
163 | static struct clk mstp_clks[] = { | 156 | static struct clk mstp_clks[] = { |
164 | /* See page 60 of Datasheet V1.0: Overview -> Block Diagram */ | 157 | /* See page 60 of Datasheet V1.0: Overview -> Block Diagram */ |
165 | SH_HWBLK_CLK("tlb0", -1, I_CLK, HWBLK_TLB, CLK_ENABLE_ON_INIT), | 158 | SH_HWBLK_CLK(HWBLK_TLB, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
166 | SH_HWBLK_CLK("ic0", -1, I_CLK, HWBLK_IC, CLK_ENABLE_ON_INIT), | 159 | SH_HWBLK_CLK(HWBLK_IC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
167 | SH_HWBLK_CLK("oc0", -1, I_CLK, HWBLK_OC, CLK_ENABLE_ON_INIT), | 160 | SH_HWBLK_CLK(HWBLK_OC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
168 | SH_HWBLK_CLK("l2c0", -1, SH_CLK, HWBLK_L2C, CLK_ENABLE_ON_INIT), | 161 | SH_HWBLK_CLK(HWBLK_L2C, &div4_clks[DIV4_SH], CLK_ENABLE_ON_INIT), |
169 | SH_HWBLK_CLK("ilmem0", -1, I_CLK, HWBLK_ILMEM, CLK_ENABLE_ON_INIT), | 162 | SH_HWBLK_CLK(HWBLK_ILMEM, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
170 | SH_HWBLK_CLK("fpu0", -1, I_CLK, HWBLK_FPU, CLK_ENABLE_ON_INIT), | 163 | SH_HWBLK_CLK(HWBLK_FPU, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
171 | SH_HWBLK_CLK("intc0", -1, I_CLK, HWBLK_INTC, CLK_ENABLE_ON_INIT), | 164 | SH_HWBLK_CLK(HWBLK_INTC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), |
172 | SH_HWBLK_CLK("dmac0", -1, B_CLK, HWBLK_DMAC0, 0), | 165 | SH_HWBLK_CLK(HWBLK_DMAC0, &div4_clks[DIV4_B], 0), |
173 | SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT), | 166 | SH_HWBLK_CLK(HWBLK_SHYWAY, &div4_clks[DIV4_SH], CLK_ENABLE_ON_INIT), |
174 | SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0), | 167 | SH_HWBLK_CLK(HWBLK_HUDI, &div4_clks[DIV4_P], 0), |
175 | SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0), | 168 | SH_HWBLK_CLK(HWBLK_UBC, &div4_clks[DIV4_I], 0), |
176 | SH_HWBLK_CLK("tmu012_fck", -1, P_CLK, HWBLK_TMU0, 0), | 169 | SH_HWBLK_CLK(HWBLK_TMU0, &div4_clks[DIV4_P], 0), |
177 | SH_HWBLK_CLK("cmt_fck", -1, R_CLK, HWBLK_CMT, 0), | 170 | SH_HWBLK_CLK(HWBLK_CMT, &r_clk, 0), |
178 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), | 171 | SH_HWBLK_CLK(HWBLK_RWDT, &r_clk, 0), |
179 | SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0), | 172 | SH_HWBLK_CLK(HWBLK_DMAC1, &div4_clks[DIV4_B], 0), |
180 | SH_HWBLK_CLK("tmu345_fck", -1, P_CLK, HWBLK_TMU1, 0), | 173 | SH_HWBLK_CLK(HWBLK_TMU1, &div4_clks[DIV4_P], 0), |
181 | SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0), | 174 | SH_HWBLK_CLK(HWBLK_FLCTL, &div4_clks[DIV4_P], 0), |
182 | SH_HWBLK_CLK("sci_fck", -1, P_CLK, HWBLK_SCIF0, 0), | 175 | SH_HWBLK_CLK(HWBLK_SCIF0, &div4_clks[DIV4_P], 0), |
183 | SH_HWBLK_CLK("sci_fck", -1, P_CLK, HWBLK_SCIF1, 0), | 176 | SH_HWBLK_CLK(HWBLK_SCIF1, &div4_clks[DIV4_P], 0), |
184 | SH_HWBLK_CLK("sci_fck", -1, P_CLK, HWBLK_SCIF2, 0), | 177 | SH_HWBLK_CLK(HWBLK_SCIF2, &div4_clks[DIV4_P], 0), |
185 | SH_HWBLK_CLK("sci_fck", -1, B_CLK, HWBLK_SCIF3, 0), | 178 | SH_HWBLK_CLK(HWBLK_SCIF3, &div4_clks[DIV4_B], 0), |
186 | SH_HWBLK_CLK("sci_fck", -1, B_CLK, HWBLK_SCIF4, 0), | 179 | SH_HWBLK_CLK(HWBLK_SCIF4, &div4_clks[DIV4_B], 0), |
187 | SH_HWBLK_CLK("sci_fck", -1, B_CLK, HWBLK_SCIF5, 0), | 180 | SH_HWBLK_CLK(HWBLK_SCIF5, &div4_clks[DIV4_B], 0), |
188 | SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0), | 181 | SH_HWBLK_CLK(HWBLK_MSIOF0, &div4_clks[DIV4_B], 0), |
189 | SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0), | 182 | SH_HWBLK_CLK(HWBLK_MSIOF1, &div4_clks[DIV4_B], 0), |
190 | SH_HWBLK_CLK("meram0", -1, SH_CLK, HWBLK_MERAM, 0), | 183 | SH_HWBLK_CLK(HWBLK_MERAM, &div4_clks[DIV4_SH], 0), |
191 | 184 | ||
192 | SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC, 0), | 185 | SH_HWBLK_CLK(HWBLK_IIC, &div4_clks[DIV4_P], 0), |
193 | SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0), | 186 | SH_HWBLK_CLK(HWBLK_RTC, &r_clk, 0), |
194 | 187 | ||
195 | SH_HWBLK_CLK("atapi0", -1, SH_CLK, HWBLK_ATAPI, 0), | 188 | SH_HWBLK_CLK(HWBLK_ATAPI, &div4_clks[DIV4_SH], 0), |
196 | SH_HWBLK_CLK("adc0", -1, P_CLK, HWBLK_ADC, 0), | 189 | SH_HWBLK_CLK(HWBLK_ADC, &div4_clks[DIV4_P], 0), |
197 | SH_HWBLK_CLK("tpu0", -1, B_CLK, HWBLK_TPU, 0), | 190 | SH_HWBLK_CLK(HWBLK_TPU, &div4_clks[DIV4_B], 0), |
198 | SH_HWBLK_CLK("irda0", -1, P_CLK, HWBLK_IRDA, 0), | 191 | SH_HWBLK_CLK(HWBLK_IRDA, &div4_clks[DIV4_P], 0), |
199 | SH_HWBLK_CLK("tsif0", -1, B_CLK, HWBLK_TSIF, 0), | 192 | SH_HWBLK_CLK(HWBLK_TSIF, &div4_clks[DIV4_B], 0), |
200 | SH_HWBLK_CLK("icb0", -1, B_CLK, HWBLK_ICB, CLK_ENABLE_ON_INIT), | 193 | SH_HWBLK_CLK(HWBLK_ICB, &div4_clks[DIV4_B], CLK_ENABLE_ON_INIT), |
201 | SH_HWBLK_CLK("sdhi0", -1, B_CLK, HWBLK_SDHI0, 0), | 194 | SH_HWBLK_CLK(HWBLK_SDHI0, &div4_clks[DIV4_B], 0), |
202 | SH_HWBLK_CLK("sdhi1", -1, B_CLK, HWBLK_SDHI1, 0), | 195 | SH_HWBLK_CLK(HWBLK_SDHI1, &div4_clks[DIV4_B], 0), |
203 | SH_HWBLK_CLK("keysc0", -1, R_CLK, HWBLK_KEYSC, 0), | 196 | SH_HWBLK_CLK(HWBLK_KEYSC, &r_clk, 0), |
204 | SH_HWBLK_CLK("usb0", -1, B_CLK, HWBLK_USB, 0), | 197 | SH_HWBLK_CLK(HWBLK_USB, &div4_clks[DIV4_B], 0), |
205 | SH_HWBLK_CLK("2dg0", -1, B_CLK, HWBLK_2DG, 0), | 198 | SH_HWBLK_CLK(HWBLK_2DG, &div4_clks[DIV4_B], 0), |
206 | SH_HWBLK_CLK("siu0", -1, B_CLK, HWBLK_SIU, 0), | 199 | SH_HWBLK_CLK(HWBLK_SIU, &div4_clks[DIV4_B], 0), |
207 | SH_HWBLK_CLK("veu1", -1, B_CLK, HWBLK_VEU2H1, 0), | 200 | SH_HWBLK_CLK(HWBLK_VEU2H1, &div4_clks[DIV4_B], 0), |
208 | SH_HWBLK_CLK("vou0", -1, B_CLK, HWBLK_VOU, 0), | 201 | SH_HWBLK_CLK(HWBLK_VOU, &div4_clks[DIV4_B], 0), |
209 | SH_HWBLK_CLK("beu0", -1, B_CLK, HWBLK_BEU, 0), | 202 | SH_HWBLK_CLK(HWBLK_BEU, &div4_clks[DIV4_B], 0), |
210 | SH_HWBLK_CLK("ceu0", -1, B_CLK, HWBLK_CEU, 0), | 203 | SH_HWBLK_CLK(HWBLK_CEU, &div4_clks[DIV4_B], 0), |
211 | SH_HWBLK_CLK("veu0", -1, B_CLK, HWBLK_VEU2H0, 0), | 204 | SH_HWBLK_CLK(HWBLK_VEU2H0, &div4_clks[DIV4_B], 0), |
212 | SH_HWBLK_CLK("vpu0", -1, B_CLK, HWBLK_VPU, 0), | 205 | SH_HWBLK_CLK(HWBLK_VPU, &div4_clks[DIV4_B], 0), |
213 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), | 206 | SH_HWBLK_CLK(HWBLK_LCDC, &div4_clks[DIV4_B], 0), |
214 | }; | 207 | }; |
215 | 208 | ||
216 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | 209 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } |