aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-10-22 09:58:36 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-05 04:17:39 -0500
commita5b8399fb6866be6ca065d8ab5eb7d8775d0ad26 (patch)
tree4d60b4580edfb1744a1832ff06c93e6d9b9770eb /drivers/video/omap2/dss/dss.c
parent13a1a2b2a68d00d8d81417606571e004e10f6d91 (diff)
OMAPDSS: hide dss_select_dispc_clk_source()
dss.c currently exposes functions to configure the dispc source clock and lcd source clock. There are configured separately from the output drivers. However, there is no safe way for the output drivers to handle dispc clock, as it's shared between the outputs. Thus, if, say, the DSI driver sets up DSI PLL and configures both the dispc and lcd clock sources to that DSI PLL, the resulting dispc clock could be too low for, say, HDMI. Thus the output drivers should really only be concerned about the lcd clock, which is what the output drivers actually use. There's lot to do to clean up the dss clock handling, but this patch takes one step forward and removes the use of dss_select_dispc_clk_source() from the output drivers. After this patch, the output drivers only configure the lcd source clock. On omap4+ the dispc src clock is never changed from the default PRCM source. On omap3, where the dispc and lcd clocks are actually the same, setting the lcd clock source sets the dispc clock source. 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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 844bb1fda911..df3d89a8c8a9 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -304,7 +304,7 @@ static void dss_dump_regs(struct seq_file *s)
304#undef DUMPREG 304#undef DUMPREG
305} 305}
306 306
307void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src) 307static void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src)
308{ 308{
309 struct platform_device *dsidev; 309 struct platform_device *dsidev;
310 int b; 310 int b;
@@ -375,8 +375,10 @@ void dss_select_lcd_clk_source(enum omap_channel channel,
375 struct platform_device *dsidev; 375 struct platform_device *dsidev;
376 int b, ix, pos; 376 int b, ix, pos;
377 377
378 if (!dss_has_feature(FEAT_LCD_CLK_SRC)) 378 if (!dss_has_feature(FEAT_LCD_CLK_SRC)) {
379 dss_select_dispc_clk_source(clk_src);
379 return; 380 return;
381 }
380 382
381 switch (clk_src) { 383 switch (clk_src) {
382 case OMAP_DSS_CLK_SRC_FCK: 384 case OMAP_DSS_CLK_SRC_FCK:
@@ -935,6 +937,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
935 /* Select DPLL */ 937 /* Select DPLL */
936 REG_FLD_MOD(DSS_CONTROL, 0, 0, 0); 938 REG_FLD_MOD(DSS_CONTROL, 0, 0, 0);
937 939
940 dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK);
941
938#ifdef CONFIG_OMAP2_DSS_VENC 942#ifdef CONFIG_OMAP2_DSS_VENC
939 REG_FLD_MOD(DSS_CONTROL, 1, 4, 4); /* venc dac demen */ 943 REG_FLD_MOD(DSS_CONTROL, 1, 4, 4); /* venc dac demen */
940 REG_FLD_MOD(DSS_CONTROL, 1, 3, 3); /* venc clock 4x enable */ 944 REG_FLD_MOD(DSS_CONTROL, 1, 3, 3); /* venc clock 4x enable */