diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-01 07:32:23 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-01 07:56:49 -0400 |
commit | 9ede365aa6f74428a1f69c21ca1cf21213167576 (patch) | |
tree | 654883a8cfe8c4f978b4476149a6a5d36892bc63 /drivers/video | |
parent | 69f06054aad122b314cd64fdafdf14fc3b8e5b7c (diff) |
HACK: OMAP: DSS2: clk hack for OMAP2/3
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 5 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 5 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 5 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 5 |
5 files changed, 19 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 48b0cdf97ce..7adbbeb8433 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -4435,7 +4435,10 @@ static int dsi_get_clocks(struct platform_device *dsidev) | |||
4435 | 4435 | ||
4436 | dsi->dss_clk = clk; | 4436 | dsi->dss_clk = clk; |
4437 | 4437 | ||
4438 | clk = clk_get(&dsidev->dev, "sys_clk"); | 4438 | if (cpu_is_omap34xx() || cpu_is_omap3630()) |
4439 | clk = clk_get(&dsidev->dev, "dss2_alwon_fck"); | ||
4440 | else | ||
4441 | clk = clk_get(&dsidev->dev, "sys_clk"); | ||
4439 | if (IS_ERR(clk)) { | 4442 | if (IS_ERR(clk)) { |
4440 | DSSERR("can't get sys_clk\n"); | 4443 | DSSERR("can't get sys_clk\n"); |
4441 | clk_put(dsi->dss_clk); | 4444 | clk_put(dsi->dss_clk); |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 9423a2ee3aa..0f9c3a6457a 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -691,6 +691,11 @@ static void dss_put_clocks(void) | |||
691 | clk_put(dss.dss_clk); | 691 | clk_put(dss.dss_clk); |
692 | } | 692 | } |
693 | 693 | ||
694 | struct clk *dss_get_ick(void) | ||
695 | { | ||
696 | return clk_get(&dss.pdev->dev, "ick"); | ||
697 | } | ||
698 | |||
694 | int dss_runtime_get(void) | 699 | int dss_runtime_get(void) |
695 | { | 700 | { |
696 | int r; | 701 | int r; |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index adeff04e964..9c94b1152c2 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -209,6 +209,8 @@ void dss_uninit_platform_driver(void); | |||
209 | int dss_runtime_get(void); | 209 | int dss_runtime_get(void); |
210 | void dss_runtime_put(void); | 210 | void dss_runtime_put(void); |
211 | 211 | ||
212 | struct clk *dss_get_ick(void); | ||
213 | |||
212 | void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select); | 214 | void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select); |
213 | const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); | 215 | const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); |
214 | void dss_dump_clocks(struct seq_file *s); | 216 | void dss_dump_clocks(struct seq_file *s); |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 2d31cc1e627..39f4c597026 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -952,7 +952,10 @@ static int omap_rfbihw_probe(struct platform_device *pdev) | |||
952 | 952 | ||
953 | msleep(10); | 953 | msleep(10); |
954 | 954 | ||
955 | clk = clk_get(&pdev->dev, "ick"); | 955 | if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap3630()) |
956 | clk = dss_get_ick(); | ||
957 | else | ||
958 | clk = clk_get(&pdev->dev, "ick"); | ||
956 | if (IS_ERR(clk)) { | 959 | if (IS_ERR(clk)) { |
957 | DSSERR("can't get ick\n"); | 960 | DSSERR("can't get ick\n"); |
958 | r = PTR_ERR(clk); | 961 | r = PTR_ERR(clk); |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 71e005df175..173c66430da 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -741,7 +741,10 @@ static int venc_get_clocks(struct platform_device *pdev) | |||
741 | venc.tv_clk = clk; | 741 | venc.tv_clk = clk; |
742 | 742 | ||
743 | if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) { | 743 | if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) { |
744 | clk = clk_get(&pdev->dev, "tv_dac_clk"); | 744 | if (cpu_is_omap34xx() || cpu_is_omap3630()) |
745 | clk = clk_get(&pdev->dev, "dss_96m_fck"); | ||
746 | else | ||
747 | clk = clk_get(&pdev->dev, "tv_dac_clk"); | ||
745 | if (IS_ERR(clk)) { | 748 | if (IS_ERR(clk)) { |
746 | DSSERR("can't get tv_dac_clk\n"); | 749 | DSSERR("can't get tv_dac_clk\n"); |
747 | clk_put(venc.tv_clk); | 750 | clk_put(venc.tv_clk); |