mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 11:21:33 +00:00
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>
This commit is contained in:
parent
1bb4783506
commit
42c9dee821
@ -166,7 +166,6 @@ static inline void dss_uninitialize_debugfs(void)
|
||||
static int omap_dss_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
|
||||
int skip_init = 0;
|
||||
int r;
|
||||
int i;
|
||||
|
||||
@ -210,13 +209,8 @@ static int omap_dss_probe(struct platform_device *pdev)
|
||||
goto err_venc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT
|
||||
/* DISPC_CONTROL */
|
||||
if (omap_readl(0x48050440) & 1) /* LCD enabled? */
|
||||
skip_init = 1;
|
||||
#endif
|
||||
if (cpu_is_omap34xx()) {
|
||||
r = sdi_init(skip_init);
|
||||
r = sdi_init();
|
||||
if (r) {
|
||||
DSSERR("Failed to initialize SDI\n");
|
||||
goto err_sdi;
|
||||
|
@ -559,7 +559,7 @@ void dss_set_dac_pwrdn_bgz(bool enable)
|
||||
REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */
|
||||
}
|
||||
|
||||
static int dss_init(bool skip_init)
|
||||
static int dss_init(void)
|
||||
{
|
||||
int r;
|
||||
u32 rev;
|
||||
@ -578,22 +578,20 @@ static int dss_init(bool skip_init)
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
if (!skip_init) {
|
||||
/* disable LCD and DIGIT output. This seems to fix the synclost
|
||||
* problem that we get, if the bootloader starts the DSS and
|
||||
* the kernel resets it */
|
||||
omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440);
|
||||
/* disable LCD and DIGIT output. This seems to fix the synclost
|
||||
* problem that we get, if the bootloader starts the DSS and
|
||||
* the kernel resets it */
|
||||
omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440);
|
||||
|
||||
/* We need to wait here a bit, otherwise we sometimes start to
|
||||
* get synclost errors, and after that only power cycle will
|
||||
* restore DSS functionality. I have no idea why this happens.
|
||||
* And we have to wait _before_ resetting the DSS, but after
|
||||
* enabling clocks.
|
||||
*/
|
||||
msleep(50);
|
||||
/* We need to wait here a bit, otherwise we sometimes start to
|
||||
* get synclost errors, and after that only power cycle will
|
||||
* restore DSS functionality. I have no idea why this happens.
|
||||
* And we have to wait _before_ resetting the DSS, but after
|
||||
* enabling clocks.
|
||||
*/
|
||||
msleep(50);
|
||||
|
||||
_omap_dss_reset();
|
||||
}
|
||||
_omap_dss_reset();
|
||||
|
||||
/* autoidle */
|
||||
REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
|
||||
@ -954,7 +952,6 @@ void dss_debug_dump_clocks(struct seq_file *s)
|
||||
static int omap_dsshw_probe(struct platform_device *pdev)
|
||||
{
|
||||
int r;
|
||||
int skip_init = 0;
|
||||
|
||||
dss.pdev = pdev;
|
||||
|
||||
@ -967,13 +964,7 @@ static int omap_dsshw_probe(struct platform_device *pdev)
|
||||
dss.ctx_id = dss_get_ctx_id();
|
||||
DSSDBG("initial ctx id %u\n", dss.ctx_id);
|
||||
|
||||
#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT
|
||||
/* DISPC_CONTROL */
|
||||
if (omap_readl(0x48050440) & 1) /* LCD enabled? */
|
||||
skip_init = 1;
|
||||
#endif
|
||||
|
||||
r = dss_init(skip_init);
|
||||
r = dss_init();
|
||||
if (r) {
|
||||
DSSERR("Failed to initialize DSS\n");
|
||||
goto err_dss;
|
||||
|
@ -251,11 +251,11 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck,
|
||||
|
||||
/* SDI */
|
||||
#ifdef CONFIG_OMAP2_DSS_SDI
|
||||
int sdi_init(bool skip_init);
|
||||
int sdi_init(void);
|
||||
void sdi_exit(void);
|
||||
int sdi_init_display(struct omap_dss_device *display);
|
||||
#else
|
||||
static inline int sdi_init(bool skip_init)
|
||||
static inline int sdi_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "dss.h"
|
||||
|
||||
static struct {
|
||||
bool skip_init;
|
||||
bool update_enabled;
|
||||
struct regulator *vdds_sdi_reg;
|
||||
} sdi;
|
||||
@ -68,9 +67,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
|
||||
if (r)
|
||||
goto err1;
|
||||
|
||||
/* In case of skip_init sdi_init has already enabled the clocks */
|
||||
if (!sdi.skip_init)
|
||||
dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
|
||||
dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
|
||||
|
||||
sdi_basic_init(dssdev);
|
||||
|
||||
@ -80,14 +77,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
|
||||
dispc_set_pol_freq(dssdev->manager->id, dssdev->panel.config,
|
||||
dssdev->panel.acbi, dssdev->panel.acb);
|
||||
|
||||
if (!sdi.skip_init) {
|
||||
r = dss_calc_clock_div(1, t->pixel_clock * 1000,
|
||||
&dss_cinfo, &dispc_cinfo);
|
||||
} else {
|
||||
r = dss_get_clock_div(&dss_cinfo);
|
||||
r = dispc_get_clock_div(dssdev->manager->id, &dispc_cinfo);
|
||||
}
|
||||
|
||||
r = dss_calc_clock_div(1, t->pixel_clock * 1000,
|
||||
&dss_cinfo, &dispc_cinfo);
|
||||
if (r)
|
||||
goto err2;
|
||||
|
||||
@ -116,18 +107,14 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
|
||||
if (r)
|
||||
goto err2;
|
||||
|
||||
if (!sdi.skip_init) {
|
||||
dss_sdi_init(dssdev->phy.sdi.datapairs);
|
||||
r = dss_sdi_enable();
|
||||
if (r)
|
||||
goto err1;
|
||||
mdelay(2);
|
||||
}
|
||||
dss_sdi_init(dssdev->phy.sdi.datapairs);
|
||||
r = dss_sdi_enable();
|
||||
if (r)
|
||||
goto err1;
|
||||
mdelay(2);
|
||||
|
||||
dssdev->manager->enable(dssdev->manager);
|
||||
|
||||
sdi.skip_init = 0;
|
||||
|
||||
return 0;
|
||||
err2:
|
||||
dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
|
||||
@ -173,17 +160,8 @@ int sdi_init_display(struct omap_dss_device *dssdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sdi_init(bool skip_init)
|
||||
int sdi_init(void)
|
||||
{
|
||||
/* we store this for first display enable, then clear it */
|
||||
sdi.skip_init = skip_init;
|
||||
|
||||
/*
|
||||
* Enable clocks already here, otherwise there would be a toggle
|
||||
* of them until sdi_display_enable is called.
|
||||
*/
|
||||
if (skip_init)
|
||||
dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user