diff options
author | Andy Green <andy.green@linaro.org> | 2011-08-25 08:04:54 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-08-25 08:04:54 +0100 |
commit | 9dfba632d385e7e139105aa809e5747b823ba7db (patch) | |
tree | 09f8c657abff0aa7a092c20ff4b6139c3812696e | |
parent | e50c93abed9badac0dd8da2c808de60f47a93a32 (diff) |
debug dss
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 10 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 31 |
2 files changed, 28 insertions, 13 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 345757cfcbe..e44b467b686 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1221,8 +1221,10 @@ static int dsi_pll_power(struct platform_device *dsidev, { int t = 0; + pr_err("dsi_pll_power\n"); + /* DSI-PLL power command 0x3 is not working */ - if (dss_has_feature(FEAT_DSI_PLL_PWR_BUG) && + if (//dss_has_feature(FEAT_DSI_PLL_PWR_BUG) && state == DSI_PLL_POWER_ON_DIV) state = DSI_PLL_POWER_ON_ALL; @@ -1232,7 +1234,7 @@ static int dsi_pll_power(struct platform_device *dsidev, /* PLL_PWR_STATUS */ while (FLD_GET(dsi_read_reg(dsidev, DSI_CLK_CTRL), 29, 28) != state) { if (++t > 1000) { - DSSERR("Failed to set DSI PLL power mode to %d\n", + pr_err("********** Failed to set DSI PLL power mode to %d\n", state); return -ENODEV; } @@ -1586,7 +1588,7 @@ int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk, int r = 0; enum dsi_pll_power_state pwstate; - DSSDBG("PLL init\n"); + pr_err("************ PLL init\n"); if (dsi->vdds_dsi_reg == NULL) { struct regulator *vdds_dsi; @@ -4220,7 +4222,7 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev) struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); int r = 0; - DSSDBG("dsi_display_enable\n"); + pr_err("dsi_display_enable\n"); WARN_ON(!dsi_bus_is_locked(dsidev)); diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 549b2313c26..02e84614c4f 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -158,7 +158,7 @@ static inline int hdmi_wait_for_bit_change(const struct hdmi_reg idx, u32 t = 0; while (val != REG_GET(idx, b2, b1)) { udelay(1); - if (t++ > 10000) + if (t++ > 20000) return !val; } return val; @@ -327,10 +327,15 @@ static int hdmi_wait_softreset(void) return 0; } -static int hdmi_pll_program(struct hdmi_pll_info *fmt) -{ - u16 r = 0; - enum hdmi_clk_refsel refsel; + static int hdmi_pll_program(struct hdmi_pll_info *fmt) + { + u16 r = 0; + enum hdmi_clk_refsel refsel; + + /* wait for wrapper reset */ + r = hdmi_wait_softreset(); + if (r) + return r; /* wait for wrapper reset */ r = hdmi_wait_softreset(); @@ -338,22 +343,30 @@ static int hdmi_pll_program(struct hdmi_pll_info *fmt) return r; r = hdmi_set_pll_pwr(HDMI_PLLPWRCMD_ALLOFF); - if (r) + if (r) { + pr_err("hdmi_set_pll_pwr says %d\n", r); return r; + } r = hdmi_set_pll_pwr(HDMI_PLLPWRCMD_BOTHON_ALLCLKS); - if (r) + if (r) { + pr_err("hdmi_set_pll_pwr on says %d\n", r); return r; + } r = hdmi_pll_reset(); - if (r) + if (r) { + pr_err("hdmi_pll_reset says %d\n", r); return r; + } refsel = HDMI_REFSEL_SYSCLK; r = hdmi_pll_init(refsel, fmt->dcofreq, fmt, fmt->regsd); - if (r) + if (r) { + pr_err("hdmi_pll_init says %d\n", r); return r; + } return 0; } |