diff options
author | Archit Taneja <archit@ti.com> | 2011-03-31 03:53:35 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-05-11 07:10:54 -0400 |
commit | 89976f2990a97820b73a1768371ee505b0ffc176 (patch) | |
tree | 95c05c461b1f0aa8079775493130a42c4bd83783 /drivers/video/omap2/dss/dss.c | |
parent | a9a6500b718a38d4658b8a61edd8fc3aa0418b50 (diff) |
OMAP: DSS2: Fix: Return correct lcd clock source for OMAP2/3
dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the
default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when
dispc_clk_source is not DSS_CLK_SRC_FCK.
Correct this function to always return dss.dispc_clk_source for OMAP2/3.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 606a182e6a83..8238a7b60761 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -385,8 +385,14 @@ enum dss_clk_source dss_get_dsi_clk_source(void) | |||
385 | 385 | ||
386 | enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) | 386 | enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) |
387 | { | 387 | { |
388 | int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; | 388 | if (dss_has_feature(FEAT_LCD_CLK_SRC)) { |
389 | return dss.lcd_clk_source[ix]; | 389 | int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; |
390 | return dss.lcd_clk_source[ix]; | ||
391 | } else { | ||
392 | /* LCD_CLK source is the same as DISPC_FCLK source for | ||
393 | * OMAP2 and OMAP3 */ | ||
394 | return dss.dispc_clk_source; | ||
395 | } | ||
390 | } | 396 | } |
391 | 397 | ||
392 | /* calculate clock rates using dividers in cinfo */ | 398 | /* calculate clock rates using dividers in cinfo */ |