From 525dae613638320c880afcc0d8d6dd27141fc4e4 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 18 May 2011 11:59:21 +0300 Subject: 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 --- drivers/video/omap2/dss/venc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/video/omap2/dss/venc.c') diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index e7485fc41fc..bf0431f788c 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -38,6 +38,7 @@ #include #include "dss.h" +#include "dss_features.h" /* Venc registers */ #define VENC_REV_ID 0x00 @@ -382,12 +383,15 @@ static void venc_reset(void) static void venc_enable_clocks(int enable) { - if (enable) - dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK | - DSS_CLK_VIDFCK); - else - dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK | - DSS_CLK_VIDFCK); + if (enable) { + dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK); + if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) + dss_clk_enable(DSS_CLK_VIDFCK); + } else { + dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK); + if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) + dss_clk_disable(DSS_CLK_VIDFCK); + } } static const struct venc_config *venc_timings_to_config( -- cgit v1.2.3-70-g09d2