HACK: OMAP: DSS2: clk hack for OMAP2/3
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 1 Aug 2011 11:32:23 +0000 (14:32 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 1 Aug 2011 11:56:49 +0000 (14:56 +0300)
The HWMOD data for OMAP2 and 3 are currently not up to date regarding
DSS (OMAP4 HWMOD data is fine). This patch makes the DSS driver to get
the opt clocks needed for OMAP2/3 with the old clock names, thus
allowing DSS driver to use runtime PM.

The HWMOD databases should be fixes ASAP, and this patch can be reverted
after that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/dss.c
drivers/video/omap2/dss/dss.h
drivers/video/omap2/dss/rfbi.c
drivers/video/omap2/dss/venc.c

index 48b0cdf97ceb8c13584083628529c779c6d0a263..7adbbeb84334f3a9ec857c8f7d00b394b2082f6c 100644 (file)
@@ -4435,7 +4435,10 @@ static int dsi_get_clocks(struct platform_device *dsidev)
 
        dsi->dss_clk = clk;
 
-       clk = clk_get(&dsidev->dev, "sys_clk");
+       if (cpu_is_omap34xx() || cpu_is_omap3630())
+               clk = clk_get(&dsidev->dev, "dss2_alwon_fck");
+       else
+               clk = clk_get(&dsidev->dev, "sys_clk");
        if (IS_ERR(clk)) {
                DSSERR("can't get sys_clk\n");
                clk_put(dsi->dss_clk);
index 9423a2ee3aac947c056b9aa811c436dba579990b..0f9c3a6457a5cba009157f9255baf88681a5d30a 100644 (file)
@@ -691,6 +691,11 @@ static void dss_put_clocks(void)
        clk_put(dss.dss_clk);
 }
 
+struct clk *dss_get_ick(void)
+{
+       return clk_get(&dss.pdev->dev, "ick");
+}
+
 int dss_runtime_get(void)
 {
        int r;
index adeff04e964fde3a4bdd3324503920be3d6b9b84..9c94b1152c208575474968d18aa90d3099276736 100644 (file)
@@ -209,6 +209,8 @@ void dss_uninit_platform_driver(void);
 int dss_runtime_get(void);
 void dss_runtime_put(void);
 
+struct clk *dss_get_ick(void);
+
 void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
 const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src);
 void dss_dump_clocks(struct seq_file *s);
index 2d31cc1e62706753d4a540d1f9f13f6b76f64c38..39f4c597026accec26621bfc5cdedd75ad1e9c4b 100644 (file)
@@ -952,7 +952,10 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
 
        msleep(10);
 
-       clk = clk_get(&pdev->dev, "ick");
+       if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap3630())
+               clk = dss_get_ick();
+       else
+               clk = clk_get(&pdev->dev, "ick");
        if (IS_ERR(clk)) {
                DSSERR("can't get ick\n");
                r = PTR_ERR(clk);
index 71e005df175944e80c8c8ffc5c0fed008ac9eee9..173c66430daded57cbf59013a1e17d08c1423b04 100644 (file)
@@ -741,7 +741,10 @@ static int venc_get_clocks(struct platform_device *pdev)
        venc.tv_clk = clk;
 
        if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) {
-               clk = clk_get(&pdev->dev, "tv_dac_clk");
+               if (cpu_is_omap34xx() || cpu_is_omap3630())
+                       clk = clk_get(&pdev->dev, "dss_96m_fck");
+               else
+                       clk = clk_get(&pdev->dev, "tv_dac_clk");
                if (IS_ERR(clk)) {
                        DSSERR("can't get tv_dac_clk\n");
                        clk_put(venc.tv_clk);