aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-08-24 16:38:43 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-24 16:38:43 -0400
commit5c3f96b20954fd6932bcfb1a860fa1d8b5b22ab0 (patch)
treebb0337f626329bd4c6dc33dc773fc4a94eb636b1
parent5a50a01bf00c8191073fdf518e1af1e950ac3af5 (diff)
ARM: mach-shmobile: sh7372 LCDC1 suspend fix
Associate the HDMI clock together with LCDC1 on sh7372. Without this patch Suspend-to-RAM hangs on the boards AP4EVB and Mackerel. The code hangs in the LCDC driver where the software is waiting forever for the hardware to power down. By explicitly associating the HDMI clock with LCDC1 we can make sure the HDMI clock is enabled using Runtime PM whenever the driver is accessing the hardware. This HDMI and LCDC1 dependency is documented in the sh7372 data sheet. Older kernels did work as expected but the recently merged (3.1-rc) 794d78f drivers: sh: late disabling of clocks V2 introduced code to turn off clocks lacking software reference which happens to include the HDMI clock that is needed by LCDC1 to operate as expected. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c1
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c1
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 9e0856b2f9e..fadbe5b3005 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -1412,6 +1412,7 @@ static void __init ap4evb_init(void)
1412 fsi_init_pm_clock(); 1412 fsi_init_pm_clock();
1413 sh7372_pm_init(); 1413 sh7372_pm_init();
1414 pm_clk_add(&fsi_device.dev, "spu2"); 1414 pm_clk_add(&fsi_device.dev, "spu2");
1415 pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
1415} 1416}
1416 1417
1417static void __init ap4evb_timer_init(void) 1418static void __init ap4evb_timer_init(void)
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index d41c01f83f1..0ea71f8d4b8 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1588,6 +1588,7 @@ static void __init mackerel_init(void)
1588 hdmi_init_pm_clock(); 1588 hdmi_init_pm_clock();
1589 sh7372_pm_init(); 1589 sh7372_pm_init();
1590 pm_clk_add(&fsi_device.dev, "spu2"); 1590 pm_clk_add(&fsi_device.dev, "spu2");
1591 pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
1591} 1592}
1592 1593
1593static void __init mackerel_timer_init(void) 1594static void __init mackerel_timer_init(void)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 6b1619a65db..e6e11e4e2d4 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -655,6 +655,8 @@ static struct clk_lookup lookups[] = {
655 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ 655 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
656 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ 656 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
657 657
658 CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1",
659 &div6_reparent_clks[DIV6_HDMI]),
658 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), 660 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
659 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), 661 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
660 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), 662 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),