aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-10-30 06:57:43 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-05 04:17:39 -0500
commit6061675b3fc83d8d190b87b54f04f0c89f605149 (patch)
tree84208b5c7ff24e1f7b812d3f06d43ed9bca2f294 /drivers/video/omap2/dss/dpi.c
parent8a3db406f5046dd14dff0e78cea0ba03efec3668 (diff)
OMAPDSS: DPI: verify if DSI PLL is operational
The SoCs that have DSI module should have a working DSI PLL. However, some rare boards have not connected the powers to the DSI PLL. This patch adds a function that tries to power up the DSI PLL, and reports if that doesn't succeed. DPI uses this function to fall back to PRCM clocks if DSI PLL doesn't work. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index ca5f49c44ece..6baeb04e60cc 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -361,6 +361,28 @@ void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
361} 361}
362EXPORT_SYMBOL(omapdss_dpi_set_data_lines); 362EXPORT_SYMBOL(omapdss_dpi_set_data_lines);
363 363
364static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
365{
366 int r;
367
368 /* do initial setup with the PLL to see if it is operational */
369
370 r = dsi_runtime_get(dsidev);
371 if (r)
372 return r;
373
374 r = dsi_pll_init(dsidev, 0, 1);
375 if (r) {
376 dsi_runtime_put(dsidev);
377 return r;
378 }
379
380 dsi_pll_uninit(dsidev, true);
381 dsi_runtime_put(dsidev);
382
383 return 0;
384}
385
364static int __init dpi_init_display(struct omap_dss_device *dssdev) 386static int __init dpi_init_display(struct omap_dss_device *dssdev)
365{ 387{
366 DSSDBG("init_display\n"); 388 DSSDBG("init_display\n");
@@ -383,6 +405,11 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
383 enum omap_dss_clk_source dispc_fclk_src = 405 enum omap_dss_clk_source dispc_fclk_src =
384 dssdev->clocks.dispc.dispc_fclk_src; 406 dssdev->clocks.dispc.dispc_fclk_src;
385 dpi.dsidev = dpi_get_dsidev(dispc_fclk_src); 407 dpi.dsidev = dpi_get_dsidev(dispc_fclk_src);
408
409 if (dpi_verify_dsi_pll(dpi.dsidev)) {
410 dpi.dsidev = NULL;
411 DSSWARN("DSI PLL not operational\n");
412 }
386 } 413 }
387 414
388 return 0; 415 return 0;