]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: mach-shmobile: sh7372 LCDC1 suspend fix
authorMagnus Damm <damm@opensource.se>
Wed, 24 Aug 2011 20:38:43 +0000 (22:38 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 24 Aug 2011 20:38:43 +0000 (22:38 +0200)
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>
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/clock-sh7372.c

index 9e0856b2f9e9fcc8adb4455267e0ec4964efa56d..fadbe5b3005d07e8f44a85e95b4d76e17b915384 100644 (file)
@@ -1412,6 +1412,7 @@ static void __init ap4evb_init(void)
        fsi_init_pm_clock();
        sh7372_pm_init();
        pm_clk_add(&fsi_device.dev, "spu2");
+       pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
 }
 
 static void __init ap4evb_timer_init(void)
index d41c01f83f152f75589cc228a186a6f98da59a5e..0ea71f8d4b89dbd74f006ab047e2618c34da0f26 100644 (file)
@@ -1588,6 +1588,7 @@ static void __init mackerel_init(void)
        hdmi_init_pm_clock();
        sh7372_pm_init();
        pm_clk_add(&fsi_device.dev, "spu2");
+       pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
 }
 
 static void __init mackerel_timer_init(void)
index 6b1619a65dbac16bf4535f106ab3b2c03016ed9f..e6e11e4e2d43a4463bd981efe2011978a7d120f4 100644 (file)
@@ -655,6 +655,8 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
        CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
 
+       CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1",
+                     &div6_reparent_clks[DIV6_HDMI]),
        CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
        CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
        CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),