aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-02 05:29:27 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-11 08:46:27 -0500
commit42c9dee82129d965bc8ca02170150817317c0135 (patch)
treef90404dfff058d84033171467248be665ec6d053 /drivers/video/omap2/dss/dss.c
parent1bb478350670fadf708d3cbd6137c32dfbe3fd5f (diff)
OMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support
FB_OMAP_BOOTLOADER_INIT does not work, and it was only partially implemented for SDI. This patch removes support for FB_OMAP_BOOTLOADER_INIT to clean up the code and to remove any assumptions that FB_OMAP_BOOTLOADER_INIT would work. Proper implementation is much more complex, requiring early boot time register and clock handling to keep the DSS running. 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.c41
1 files changed, 16 insertions, 25 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 5c6805b3362d..4025a14c5bc1 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -559,7 +559,7 @@ void dss_set_dac_pwrdn_bgz(bool enable)
559 REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */ 559 REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */
560} 560}
561 561
562static int dss_init(bool skip_init) 562static int dss_init(void)
563{ 563{
564 int r; 564 int r;
565 u32 rev; 565 u32 rev;
@@ -578,22 +578,20 @@ static int dss_init(bool skip_init)
578 goto fail0; 578 goto fail0;
579 } 579 }
580 580
581 if (!skip_init) { 581 /* disable LCD and DIGIT output. This seems to fix the synclost
582 /* disable LCD and DIGIT output. This seems to fix the synclost 582 * problem that we get, if the bootloader starts the DSS and
583 * problem that we get, if the bootloader starts the DSS and 583 * the kernel resets it */
584 * the kernel resets it */ 584 omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440);
585 omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440); 585
586 586 /* We need to wait here a bit, otherwise we sometimes start to
587 /* We need to wait here a bit, otherwise we sometimes start to 587 * get synclost errors, and after that only power cycle will
588 * get synclost errors, and after that only power cycle will 588 * restore DSS functionality. I have no idea why this happens.
589 * restore DSS functionality. I have no idea why this happens. 589 * And we have to wait _before_ resetting the DSS, but after
590 * And we have to wait _before_ resetting the DSS, but after 590 * enabling clocks.
591 * enabling clocks. 591 */
592 */ 592 msleep(50);
593 msleep(50); 593
594 594 _omap_dss_reset();
595 _omap_dss_reset();
596 }
597 595
598 /* autoidle */ 596 /* autoidle */
599 REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0); 597 REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
@@ -954,7 +952,6 @@ void dss_debug_dump_clocks(struct seq_file *s)
954static int omap_dsshw_probe(struct platform_device *pdev) 952static int omap_dsshw_probe(struct platform_device *pdev)
955{ 953{
956 int r; 954 int r;
957 int skip_init = 0;
958 955
959 dss.pdev = pdev; 956 dss.pdev = pdev;
960 957
@@ -967,13 +964,7 @@ static int omap_dsshw_probe(struct platform_device *pdev)
967 dss.ctx_id = dss_get_ctx_id(); 964 dss.ctx_id = dss_get_ctx_id();
968 DSSDBG("initial ctx id %u\n", dss.ctx_id); 965 DSSDBG("initial ctx id %u\n", dss.ctx_id);
969 966
970#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT 967 r = dss_init();
971 /* DISPC_CONTROL */
972 if (omap_readl(0x48050440) & 1) /* LCD enabled? */
973 skip_init = 1;
974#endif
975
976 r = dss_init(skip_init);
977 if (r) { 968 if (r) {
978 DSSERR("Failed to initialize DSS\n"); 969 DSSERR("Failed to initialize DSS\n");
979 goto err_dss; 970 goto err_dss;