aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorManjunathappa, Prakash <prakash.pm@ti.com>2012-07-20 11:51:11 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-07-28 21:15:35 -0400
commit92b4e4506550fe25c65799eebb215d47a244e635 (patch)
tree64cfc7c29c58c468e582ce986516aab49c9c6da0 /drivers/video
parenta652aa79a93a90b7db1114f6fff02952e687f196 (diff)
video: da8xx-fb: do clock reset of revision 2 LCDC before enabling
As in specification software reset should be applied for several cycles before bringing it out of reset. Without this patch particularly during suspend and resume clock reset is not guaranteed to happen. Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/da8xx-fb.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 6f0fb2d50c28..e81a4585902b 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -269,10 +269,18 @@ static inline void lcd_enable_raster(void)
269{ 269{
270 u32 reg; 270 u32 reg;
271 271
272 /* Put LCDC in reset for several cycles */
273 if (lcd_revision == LCD_VERSION_2)
274 /* Write 1 to reset LCDC */
275 lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
276 mdelay(1);
277
272 /* Bring LCDC out of reset */ 278 /* Bring LCDC out of reset */
273 if (lcd_revision == LCD_VERSION_2) 279 if (lcd_revision == LCD_VERSION_2)
274 lcdc_write(0, LCD_CLK_RESET_REG); 280 lcdc_write(0, LCD_CLK_RESET_REG);
281 mdelay(1);
275 282
283 /* Above reset sequence doesnot reset register context */
276 reg = lcdc_read(LCD_RASTER_CTRL_REG); 284 reg = lcdc_read(LCD_RASTER_CTRL_REG);
277 if (!(reg & LCD_RASTER_ENABLE)) 285 if (!(reg & LCD_RASTER_ENABLE))
278 lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG); 286 lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
@@ -286,10 +294,6 @@ static inline void lcd_disable_raster(void)
286 reg = lcdc_read(LCD_RASTER_CTRL_REG); 294 reg = lcdc_read(LCD_RASTER_CTRL_REG);
287 if (reg & LCD_RASTER_ENABLE) 295 if (reg & LCD_RASTER_ENABLE)
288 lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG); 296 lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
289
290 if (lcd_revision == LCD_VERSION_2)
291 /* Write 1 to reset LCDC */
292 lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
293} 297}
294 298
295static void lcd_blit(int load_mode, struct da8xx_fb_par *par) 299static void lcd_blit(int load_mode, struct da8xx_fb_par *par)