diff options
-rw-r--r-- | drivers/video/mxc/mxc_epdc_fb.c | 19 | ||||
-rw-r--r-- | drivers/video/mxc/mxc_spdc_fb.c | 3 |
2 files changed, 18 insertions, 4 deletions
diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c index 730fba6961c3..f78200887054 100644 --- a/drivers/video/mxc/mxc_epdc_fb.c +++ b/drivers/video/mxc/mxc_epdc_fb.c @@ -847,7 +847,7 @@ static void epdc_set_vertical_timing(u32 vert_start, u32 vert_end, __raw_writel(reg_val, EPDC_TCE_VSCAN); } -void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) +static void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) { struct imx_epdc_fb_mode *epdc_mode = fb_data->cur_mode; struct fb_var_screeninfo *screeninfo = &fb_data->epdc_fb_var; @@ -855,6 +855,9 @@ void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) int num_ce; int i; + /* Enable clocks to access EPDC regs */ + clk_enable(fb_data->epdc_clk_axi); + /* Reset */ __raw_writel(EPDC_CTRL_SFTRST, EPDC_CTRL_SET); while (!(__raw_readl(EPDC_CTRL) & EPDC_CTRL_CLKGATE)) @@ -1017,6 +1020,13 @@ void epdc_init_settings(struct mxc_epdc_fb_data *fb_data) reg_val = ((0 << EPDC_GPIO_PWRCTRL_OFFSET) & EPDC_GPIO_PWRCTRL_MASK) | ((0 << EPDC_GPIO_BDR_OFFSET) & EPDC_GPIO_BDR_MASK); __raw_writel(reg_val, EPDC_GPIO); + + __raw_writel(fb_data->waveform_buffer_phys, EPDC_WVADDR); + __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR); + __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR_TCE); + + /* Disable clock */ + clk_disable(fb_data->epdc_clk_axi); } static void epdc_powerup(struct mxc_epdc_fb_data *fb_data) @@ -1128,9 +1138,6 @@ static void epdc_init_sequence(struct mxc_epdc_fb_data *fb_data) { /* Initialize EPDC, passing pointer to EPDC registers */ epdc_init_settings(fb_data); - __raw_writel(fb_data->waveform_buffer_phys, EPDC_WVADDR); - __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR); - __raw_writel(fb_data->working_buffer_phys, EPDC_WB_ADDR_TCE); fb_data->in_init = true; epdc_powerup(fb_data); draw_mode0(fb_data); @@ -4830,6 +4837,7 @@ static int mxc_epdc_fb_suspend(struct platform_device *pdev, pm_message_t state) struct mxc_epdc_fb_data *data = platform_get_drvdata(pdev); int ret; + data->pwrdown_delay = FB_POWERDOWN_DISABLE; ret = mxc_epdc_fb_blank(FB_BLANK_POWERDOWN, &data->info); if (ret) goto out; @@ -4843,6 +4851,9 @@ static int mxc_epdc_fb_resume(struct platform_device *pdev) struct mxc_epdc_fb_data *data = platform_get_drvdata(pdev); mxc_epdc_fb_blank(FB_BLANK_UNBLANK, &data->info); + epdc_init_settings(data); + data->updates_active = false; + return 0; } #else diff --git a/drivers/video/mxc/mxc_spdc_fb.c b/drivers/video/mxc/mxc_spdc_fb.c index 67561a788403..8226dc724e3e 100644 --- a/drivers/video/mxc/mxc_spdc_fb.c +++ b/drivers/video/mxc/mxc_spdc_fb.c @@ -4128,6 +4128,7 @@ static int mxc_spdc_fb_suspend(struct platform_device *pdev, mxc_spdc_t *data = platform_get_drvdata(pdev); int ret; + data->pwrdown_delay = FB_POWERDOWN_DISABLE; ret = mxc_spdc_fb_blank(FB_BLANK_POWERDOWN, &data->info); return ret; @@ -4138,6 +4139,8 @@ static int mxc_spdc_fb_resume(struct platform_device *pdev) mxc_spdc_t *data = platform_get_drvdata(pdev); mxc_spdc_fb_blank(FB_BLANK_UNBLANK, &data->info); + spdc_init_sequence(data); + return 0; } #else |