diff options
author | Magnus Damm <damm@opensource.se> | 2010-05-10 10:01:22 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-10 22:48:39 -0400 |
commit | fd30401b07fdcf21e4be87fd276d1b2c84d712a3 (patch) | |
tree | eba1a28658d1e83e4e86c785db7cfcbe0db50d0b /arch/sh/kernel/cpu/sh4a/clock-sh7723.c | |
parent | e4e06697977bf6731d940ab1bd84e16cb53c3ae3 (diff) |
sh: tie in hwblk clocks using clkdev
Use clkdev for lookup of hwblk clocks on
sh7722/sh7723/sh7724.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/clock-sh7723.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh7723.c | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c index d92d7cddd09..36e17dc27b0 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c | |||
@@ -213,7 +213,21 @@ static struct clk mstp_clks[] = { | |||
213 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), | 213 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), |
214 | }; | 214 | }; |
215 | 215 | ||
216 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | ||
217 | |||
216 | static struct clk_lookup lookups[] = { | 218 | static struct clk_lookup lookups[] = { |
219 | /* MSTP clocks */ | ||
220 | CLKDEV_CON_ID("tlb0", &mstp_clks[HWBLK_TLB]), | ||
221 | CLKDEV_CON_ID("ic0", &mstp_clks[HWBLK_IC]), | ||
222 | CLKDEV_CON_ID("oc0", &mstp_clks[HWBLK_OC]), | ||
223 | CLKDEV_CON_ID("l2c0", &mstp_clks[HWBLK_L2C]), | ||
224 | CLKDEV_CON_ID("ilmem0", &mstp_clks[HWBLK_ILMEM]), | ||
225 | CLKDEV_CON_ID("fpu0", &mstp_clks[HWBLK_FPU]), | ||
226 | CLKDEV_CON_ID("intc0", &mstp_clks[HWBLK_INTC]), | ||
227 | CLKDEV_CON_ID("dmac0", &mstp_clks[HWBLK_DMAC0]), | ||
228 | CLKDEV_CON_ID("sh0", &mstp_clks[HWBLK_SHYWAY]), | ||
229 | CLKDEV_CON_ID("hudi0", &mstp_clks[HWBLK_HUDI]), | ||
230 | CLKDEV_CON_ID("ubc0", &mstp_clks[HWBLK_UBC]), | ||
217 | { | 231 | { |
218 | /* TMU0 */ | 232 | /* TMU0 */ |
219 | .dev_id = "sh_tmu.0", | 233 | .dev_id = "sh_tmu.0", |
@@ -229,7 +243,11 @@ static struct clk_lookup lookups[] = { | |||
229 | .dev_id = "sh_tmu.2", | 243 | .dev_id = "sh_tmu.2", |
230 | .con_id = "tmu_fck", | 244 | .con_id = "tmu_fck", |
231 | .clk = &mstp_clks[HWBLK_TMU0], | 245 | .clk = &mstp_clks[HWBLK_TMU0], |
232 | }, { | 246 | }, |
247 | CLKDEV_CON_ID("cmt_fck", &mstp_clks[HWBLK_CMT]), | ||
248 | CLKDEV_CON_ID("rwdt0", &mstp_clks[HWBLK_RWDT]), | ||
249 | CLKDEV_CON_ID("dmac1", &mstp_clks[HWBLK_DMAC1]), | ||
250 | { | ||
233 | /* TMU3 */ | 251 | /* TMU3 */ |
234 | .dev_id = "sh_tmu.3", | 252 | .dev_id = "sh_tmu.3", |
235 | .con_id = "tmu_fck", | 253 | .con_id = "tmu_fck", |
@@ -244,7 +262,9 @@ static struct clk_lookup lookups[] = { | |||
244 | .dev_id = "sh_tmu.5", | 262 | .dev_id = "sh_tmu.5", |
245 | .con_id = "tmu_fck", | 263 | .con_id = "tmu_fck", |
246 | .clk = &mstp_clks[HWBLK_TMU1], | 264 | .clk = &mstp_clks[HWBLK_TMU1], |
247 | }, { | 265 | }, |
266 | CLKDEV_CON_ID("flctl0", &mstp_clks[HWBLK_FLCTL]), | ||
267 | { | ||
248 | /* SCIF0 */ | 268 | /* SCIF0 */ |
249 | .dev_id = "sh-sci.0", | 269 | .dev_id = "sh-sci.0", |
250 | .con_id = "sci_fck", | 270 | .con_id = "sci_fck", |
@@ -275,6 +295,30 @@ static struct clk_lookup lookups[] = { | |||
275 | .con_id = "sci_fck", | 295 | .con_id = "sci_fck", |
276 | .clk = &mstp_clks[HWBLK_SCIF5], | 296 | .clk = &mstp_clks[HWBLK_SCIF5], |
277 | }, | 297 | }, |
298 | CLKDEV_CON_ID("msiof0", &mstp_clks[HWBLK_MSIOF0]), | ||
299 | CLKDEV_CON_ID("msiof1", &mstp_clks[HWBLK_MSIOF1]), | ||
300 | CLKDEV_CON_ID("meram0", &mstp_clks[HWBLK_MERAM]), | ||
301 | CLKDEV_CON_ID("i2c0", &mstp_clks[HWBLK_IIC]), | ||
302 | CLKDEV_CON_ID("rtc0", &mstp_clks[HWBLK_RTC]), | ||
303 | CLKDEV_CON_ID("atapi0", &mstp_clks[HWBLK_ATAPI]), | ||
304 | CLKDEV_CON_ID("adc0", &mstp_clks[HWBLK_ADC]), | ||
305 | CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]), | ||
306 | CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]), | ||
307 | CLKDEV_CON_ID("tsif0", &mstp_clks[HWBLK_TSIF]), | ||
308 | CLKDEV_CON_ID("icb0", &mstp_clks[HWBLK_ICB]), | ||
309 | CLKDEV_CON_ID("sdhi0", &mstp_clks[HWBLK_SDHI0]), | ||
310 | CLKDEV_CON_ID("sdhi1", &mstp_clks[HWBLK_SDHI1]), | ||
311 | CLKDEV_CON_ID("keysc0", &mstp_clks[HWBLK_KEYSC]), | ||
312 | CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB]), | ||
313 | CLKDEV_CON_ID("2dg0", &mstp_clks[HWBLK_2DG]), | ||
314 | CLKDEV_CON_ID("siu0", &mstp_clks[HWBLK_SIU]), | ||
315 | CLKDEV_CON_ID("veu1", &mstp_clks[HWBLK_VEU2H1]), | ||
316 | CLKDEV_CON_ID("vou0", &mstp_clks[HWBLK_VOU]), | ||
317 | CLKDEV_CON_ID("beu0", &mstp_clks[HWBLK_BEU]), | ||
318 | CLKDEV_CON_ID("ceu0", &mstp_clks[HWBLK_CEU]), | ||
319 | CLKDEV_CON_ID("veu0", &mstp_clks[HWBLK_VEU2H0]), | ||
320 | CLKDEV_CON_ID("vpu0", &mstp_clks[HWBLK_VPU]), | ||
321 | CLKDEV_CON_ID("lcdc0", &mstp_clks[HWBLK_LCDC]), | ||
278 | }; | 322 | }; |
279 | 323 | ||
280 | int __init arch_clk_init(void) | 324 | int __init arch_clk_init(void) |