diff options
Diffstat (limited to 'arch/arm/mach-shmobile/clock-r8a7740.c')
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7740.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index b09534352f97..ce0930a415e8 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -43,6 +43,8 @@ | |||
43 | /* CPG registers */ | 43 | /* CPG registers */ |
44 | #define FRQCRA 0xe6150000 | 44 | #define FRQCRA 0xe6150000 |
45 | #define FRQCRB 0xe6150004 | 45 | #define FRQCRB 0xe6150004 |
46 | #define VCLKCR1 0xE6150008 | ||
47 | #define VCLKCR2 0xE615000c | ||
46 | #define FRQCRC 0xe61500e0 | 48 | #define FRQCRC 0xe61500e0 |
47 | #define PLLC01CR 0xe6150028 | 49 | #define PLLC01CR 0xe6150028 |
48 | 50 | ||
@@ -317,6 +319,7 @@ static struct clk_div4_table div4_table = { | |||
317 | /* DIV6 reparent */ | 319 | /* DIV6 reparent */ |
318 | enum { | 320 | enum { |
319 | DIV6_HDMI, | 321 | DIV6_HDMI, |
322 | DIV6_VCLK1, DIV6_VCLK2, | ||
320 | DIV6_REPARENT_NR, | 323 | DIV6_REPARENT_NR, |
321 | }; | 324 | }; |
322 | 325 | ||
@@ -326,9 +329,21 @@ static struct clk *hdmi_parent[] = { | |||
326 | [2] = &dv_clk | 329 | [2] = &dv_clk |
327 | }; | 330 | }; |
328 | 331 | ||
332 | static struct clk *vclk_parents[8] = { | ||
333 | [0] = &pllc1_div2_clk, | ||
334 | [2] = &dv_clk, | ||
335 | [3] = &usb24s_clk, | ||
336 | [4] = &extal1_div2_clk, | ||
337 | [5] = &extalr_clk, | ||
338 | }; | ||
339 | |||
329 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { | 340 | static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = { |
330 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(HDMICKCR, 0, | 341 | [DIV6_HDMI] = SH_CLK_DIV6_EXT(HDMICKCR, 0, |
331 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), | 342 | hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2), |
343 | [DIV6_VCLK1] = SH_CLK_DIV6_EXT(VCLKCR1, 0, | ||
344 | vclk_parents, ARRAY_SIZE(vclk_parents), 12, 3), | ||
345 | [DIV6_VCLK2] = SH_CLK_DIV6_EXT(VCLKCR2, 0, | ||
346 | vclk_parents, ARRAY_SIZE(vclk_parents), 12, 3), | ||
332 | }; | 347 | }; |
333 | 348 | ||
334 | /* HDMI1/2 clock */ | 349 | /* HDMI1/2 clock */ |
@@ -417,7 +432,7 @@ static struct clk div6_clks[DIV6_NR] = { | |||
417 | }; | 432 | }; |
418 | 433 | ||
419 | enum { | 434 | enum { |
420 | MSTP125, | 435 | MSTP128, MSTP127, MSTP125, |
421 | MSTP116, MSTP111, MSTP100, MSTP117, | 436 | MSTP116, MSTP111, MSTP100, MSTP117, |
422 | 437 | ||
423 | MSTP230, | 438 | MSTP230, |
@@ -434,6 +449,8 @@ enum { | |||
434 | }; | 449 | }; |
435 | 450 | ||
436 | static struct clk mstp_clks[MSTP_NR] = { | 451 | static struct clk mstp_clks[MSTP_NR] = { |
452 | [MSTP128] = SH_CLK_MSTP32(&div4_clks[DIV4_S], SMSTPCR1, 28, 0), /* CEU21 */ | ||
453 | [MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_S], SMSTPCR1, 27, 0), /* CEU20 */ | ||
437 | [MSTP125] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ | 454 | [MSTP125] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ |
438 | [MSTP117] = SH_CLK_MSTP32(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ | 455 | [MSTP117] = SH_CLK_MSTP32(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ |
439 | [MSTP116] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ | 456 | [MSTP116] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ |
@@ -484,6 +501,8 @@ static struct clk_lookup lookups[] = { | |||
484 | CLKDEV_CON_ID("usb24s", &usb24s_clk), | 501 | CLKDEV_CON_ID("usb24s", &usb24s_clk), |
485 | CLKDEV_CON_ID("hdmi1", &hdmi1_clk), | 502 | CLKDEV_CON_ID("hdmi1", &hdmi1_clk), |
486 | CLKDEV_CON_ID("hdmi2", &hdmi2_clk), | 503 | CLKDEV_CON_ID("hdmi2", &hdmi2_clk), |
504 | CLKDEV_CON_ID("video1", &div6_reparent_clks[DIV6_VCLK1]), | ||
505 | CLKDEV_CON_ID("video2", &div6_reparent_clks[DIV6_VCLK2]), | ||
487 | 506 | ||
488 | /* DIV4 clocks */ | 507 | /* DIV4 clocks */ |
489 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), | 508 | CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]), |
@@ -506,6 +525,8 @@ static struct clk_lookup lookups[] = { | |||
506 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), | 525 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), |
507 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), | 526 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), |
508 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), | 527 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), |
528 | CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), | ||
529 | CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]), | ||
509 | 530 | ||
510 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), | 531 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), |
511 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), | 532 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), |