aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c38
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c13
2 files changed, 8 insertions, 43 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 2f8c83703572..87f9ee9eda41 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -526,44 +526,6 @@ static struct platform_device mipidsi0_device = {
526 }, 526 },
527}; 527};
528 528
529/* This function will disappear when we switch to (runtime) PM */
530static int __init ap4evb_init_display_clk(void)
531{
532 struct clk *lcdc_clk;
533 struct clk *dsitx_clk;
534 int ret;
535
536 lcdc_clk = clk_get(&lcdc_device.dev, "sh_mobile_lcdc_fb.0");
537 if (IS_ERR(lcdc_clk))
538 return PTR_ERR(lcdc_clk);
539
540 dsitx_clk = clk_get(&mipidsi0_device.dev, "sh-mipi-dsi.0");
541 if (IS_ERR(dsitx_clk)) {
542 ret = PTR_ERR(dsitx_clk);
543 goto eclkdsitxget;
544 }
545
546 ret = clk_enable(lcdc_clk);
547 if (ret < 0)
548 goto eclklcdcon;
549
550 ret = clk_enable(dsitx_clk);
551 if (ret < 0)
552 goto eclkdsitxon;
553
554 return 0;
555
556eclkdsitxon:
557 clk_disable(lcdc_clk);
558eclklcdcon:
559 clk_put(dsitx_clk);
560eclkdsitxget:
561 clk_put(lcdc_clk);
562
563 return ret;
564}
565device_initcall(ap4evb_init_display_clk);
566
567static struct platform_device *qhd_devices[] __initdata = { 529static struct platform_device *qhd_devices[] __initdata = {
568 &mipidsi0_device, 530 &mipidsi0_device,
569 &keysc_device, 531 &keysc_device,
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 7db31e6c6bf2..f4b9ae211566 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -524,7 +524,7 @@ enum { MSTP001,
524 MSTP223, 524 MSTP223,
525 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, 525 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
526 MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, 526 MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312,
527 MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, 527 MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403,
528 MSTP_NR }; 528 MSTP_NR };
529 529
530#define MSTP(_parent, _reg, _bit, _flags) \ 530#define MSTP(_parent, _reg, _bit, _flags) \
@@ -560,6 +560,7 @@ static struct clk mstp_clks[MSTP_NR] = {
560 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ 560 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
561 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ 561 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
562 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ 562 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
563 [MSTP423] = MSTP(&div4_clks[DIV4_B], SMSTPCR4, 23, 0), /* DSITX1 */
563 [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */ 564 [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */
564 [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ 565 [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
565 [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ 566 [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
@@ -615,9 +616,10 @@ static struct clk_lookup lookups[] = {
615 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), 616 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
616 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), 617 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
617 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), 618 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]),
618 CLKDEV_CON_ID("dsit_clk", &div6_clks[DIV6_DSIT]), 619 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
619 CLKDEV_CON_ID("dsi0p_clk", &div6_clks[DIV6_DSI0P]), 620 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
620 CLKDEV_CON_ID("dsi1p_clk", &div6_clks[DIV6_DSI1P]), 621 CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
622 CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
621 623
622 /* MSTP32 clocks */ 624 /* MSTP32 clocks */
623 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ 625 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */
@@ -629,7 +631,7 @@ static struct clk_lookup lookups[] = {
629 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ 631 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */
630 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ 632 CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
631 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ 633 CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
632 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ 634 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */
633 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ 635 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */
634 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ 636 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */
635 CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ 637 CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */
@@ -652,6 +654,7 @@ static struct clk_lookup lookups[] = {
652 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ 654 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
653 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ 655 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
654 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */ 656 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
657 CLKDEV_DEV_ID("sh-mipi-dsi.1", &mstp_clks[MSTP423]), /* DSITX1 */
655 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */ 658 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */
656 CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ 659 CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */
657 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ 660 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */