]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/video/fbdev/mxsfb.c
ENGR00296050 mxsfb: fb failed to work after suspend in console mode
[karo-tx-linux.git] / drivers / video / fbdev / mxsfb.c
index 09bfd79748f9b1f9138d5127e34c426716e5090e..5e5901403e5b62c47bf53a2bf87a0da6f2de1cbc 100644 (file)
@@ -4,7 +4,7 @@
  * This code is based on:
  * Author: Vitaly Wool <vital@embeddedalley.com>
  *
- * Copyright 2008-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -358,6 +358,9 @@ static void mxsfb_enable_controller(struct fb_info *fb_info)
        clk_prepare_enable(host->clk_pix);
        clk_set_rate(host->clk_pix, PICOS2KHZ(fb_info->var.pixclock) * 1000U);
 
+       /* Clean soft reset and clock gate bit if it was enabled  */
+       writel(CTRL_SFTRST | CTRL_CLKGATE, host->base + LCDC_CTRL + REG_CLR);
+
        /* if it was disabled, re-enable the mode again */
        writel(CTRL_DOTCLK_MODE, host->base + LCDC_CTRL + REG_SET);
 
@@ -587,6 +590,7 @@ static int mxsfb_blank(int blank, struct fb_info *fb_info)
        case FB_BLANK_UNBLANK:
                if (!host->enabled)
                        mxsfb_enable_controller(fb_info);
+               mxsfb_set_par(&host->fb_info);
                break;
        }
        return 0;