diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-05-18 04:59:21 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-07-01 05:06:43 -0400 |
commit | 525dae613638320c880afcc0d8d6dd27141fc4e4 (patch) | |
tree | d4e863cef4a21775576ae6896a1e18ee50059399 /drivers | |
parent | 8ef0e614b3ed2e2daf7e9cefd9a2f12652f824bc (diff) |
OMAP: DSS2: Add FEAT_VENC_REQUIRES_TV_DAC_CLK
OMAP3430 requires an 96MHz clock to VENC's DAC, but no other OMAP needs
it.
Add a new feature, FEAT_VENC_REQUIRES_TV_DAC_CLK, which tells if the
clock is needed on this platform, and use that feature in venc.c to
decide if the clock needs enabling.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 16 |
3 files changed, 13 insertions, 7 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 1c18888e5df3..a588380eec22 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -286,7 +286,8 @@ static const struct omap_dss_features omap3430_dss_features = { | |||
286 | FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE | | 286 | FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE | |
287 | FEAT_FUNCGATED | FEAT_ROWREPEATENABLE | | 287 | FEAT_FUNCGATED | FEAT_ROWREPEATENABLE | |
288 | FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF | | 288 | FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF | |
289 | FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC, | 289 | FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC | |
290 | FEAT_VENC_REQUIRES_TV_DAC_CLK, | ||
290 | 291 | ||
291 | .num_mgrs = 2, | 292 | .num_mgrs = 2, |
292 | .num_ovls = 3, | 293 | .num_ovls = 3, |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 07b346f7d916..3058e24946ad 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -51,6 +51,7 @@ enum dss_feat_id { | |||
51 | FEAT_HDMI_CTS_SWMODE = 1 << 19, | 51 | FEAT_HDMI_CTS_SWMODE = 1 << 19, |
52 | FEAT_HANDLE_UV_SEPARATE = 1 << 20, | 52 | FEAT_HANDLE_UV_SEPARATE = 1 << 20, |
53 | FEAT_ATTR2 = 1 << 21, | 53 | FEAT_ATTR2 = 1 << 21, |
54 | FEAT_VENC_REQUIRES_TV_DAC_CLK = 1 << 22, | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | /* DSS register field id */ | 57 | /* DSS register field id */ |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index e7485fc41fca..bf0431f788c1 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
39 | 39 | ||
40 | #include "dss.h" | 40 | #include "dss.h" |
41 | #include "dss_features.h" | ||
41 | 42 | ||
42 | /* Venc registers */ | 43 | /* Venc registers */ |
43 | #define VENC_REV_ID 0x00 | 44 | #define VENC_REV_ID 0x00 |
@@ -382,12 +383,15 @@ static void venc_reset(void) | |||
382 | 383 | ||
383 | static void venc_enable_clocks(int enable) | 384 | static void venc_enable_clocks(int enable) |
384 | { | 385 | { |
385 | if (enable) | 386 | if (enable) { |
386 | dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK | | 387 | dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK); |
387 | DSS_CLK_VIDFCK); | 388 | if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) |
388 | else | 389 | dss_clk_enable(DSS_CLK_VIDFCK); |
389 | dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK | | 390 | } else { |
390 | DSS_CLK_VIDFCK); | 391 | dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK); |
392 | if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) | ||
393 | dss_clk_disable(DSS_CLK_VIDFCK); | ||
394 | } | ||
391 | } | 395 | } |
392 | 396 | ||
393 | static const struct venc_config *venc_timings_to_config( | 397 | static const struct venc_config *venc_timings_to_config( |