aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dsi.c12
-rw-r--r--drivers/video/omap2/dss/dss.c6
-rw-r--r--drivers/video/omap2/dss/dss.h8
3 files changed, 26 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 04d84d13488b..6035904f1314 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -3195,6 +3195,18 @@ int dsi_init_display(struct omap_dss_device *dssdev)
3195 return 0; 3195 return 0;
3196} 3196}
3197 3197
3198void dsi_wait_dsi1_pll_active(void)
3199{
3200 if (wait_for_bit_change(DSI_PLL_STATUS, 7, 1) != 1)
3201 DSSERR("DSI1 PLL clock not active\n");
3202}
3203
3204void dsi_wait_dsi2_pll_active(void)
3205{
3206 if (wait_for_bit_change(DSI_PLL_STATUS, 8, 1) != 1)
3207 DSSERR("DSI2 PLL clock not active\n");
3208}
3209
3198int dsi_init(struct platform_device *pdev) 3210int dsi_init(struct platform_device *pdev)
3199{ 3211{
3200 u32 rev; 3212 u32 rev;
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 24b18258654f..77c3621c9171 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -265,6 +265,9 @@ void dss_select_dispc_clk_source(enum dss_clk_source clk_src)
265 265
266 b = clk_src == DSS_SRC_DSS1_ALWON_FCLK ? 0 : 1; 266 b = clk_src == DSS_SRC_DSS1_ALWON_FCLK ? 0 : 1;
267 267
268 if (clk_src == DSS_SRC_DSI1_PLL_FCLK)
269 dsi_wait_dsi1_pll_active();
270
268 REG_FLD_MOD(DSS_CONTROL, b, 0, 0); /* DISPC_CLK_SWITCH */ 271 REG_FLD_MOD(DSS_CONTROL, b, 0, 0); /* DISPC_CLK_SWITCH */
269 272
270 dss.dispc_clk_source = clk_src; 273 dss.dispc_clk_source = clk_src;
@@ -279,6 +282,9 @@ void dss_select_dsi_clk_source(enum dss_clk_source clk_src)
279 282
280 b = clk_src == DSS_SRC_DSS1_ALWON_FCLK ? 0 : 1; 283 b = clk_src == DSS_SRC_DSS1_ALWON_FCLK ? 0 : 1;
281 284
285 if (clk_src == DSS_SRC_DSI2_PLL_FCLK)
286 dsi_wait_dsi2_pll_active();
287
282 REG_FLD_MOD(DSS_CONTROL, b, 1, 1); /* DSI_CLK_SWITCH */ 288 REG_FLD_MOD(DSS_CONTROL, b, 1, 1); /* DSI_CLK_SWITCH */
283 289
284 dss.dsi_clk_source = clk_src; 290 dss.dsi_clk_source = clk_src;
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 786f433fd571..66e8e97d06a7 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -281,6 +281,8 @@ void dsi_pll_uninit(void);
281void dsi_get_overlay_fifo_thresholds(enum omap_plane plane, 281void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
282 u32 fifo_size, enum omap_burst_size *burst_size, 282 u32 fifo_size, enum omap_burst_size *burst_size,
283 u32 *fifo_low, u32 *fifo_high); 283 u32 *fifo_low, u32 *fifo_high);
284void dsi_wait_dsi1_pll_active(void);
285void dsi_wait_dsi2_pll_active(void);
284#else 286#else
285static inline int dsi_init(struct platform_device *pdev) 287static inline int dsi_init(struct platform_device *pdev)
286{ 288{
@@ -289,6 +291,12 @@ static inline int dsi_init(struct platform_device *pdev)
289static inline void dsi_exit(void) 291static inline void dsi_exit(void)
290{ 292{
291} 293}
294static inline void dsi_wait_dsi1_pll_active(void)
295{
296}
297static inline void dsi_wait_dsi2_pll_active(void)
298{
299}
292#endif 300#endif
293 301
294/* DPI */ 302/* DPI */