diff options
author | Fancy Fang <chen.fang@freescale.com> | 2015-07-13 16:34:28 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:23:59 -0500 |
commit | 3cc765c3a8a52322b9f09f62f41b0f875c5b5d6a (patch) | |
tree | d9ac7cbf72fd3eee6c0e03d718911856d25c37d8 /drivers/video | |
parent | 7f9bfec9bdc13f387565ddeaa48cc4c093654867 (diff) |
MLK-11242-2 video: mxsfb: refine lcdif clock management
Remove unnecessary clk enable/disable calls. This will
make the driver logic clear and easier to maintaine.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxsfb.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index e14847b379a7..fbecff75936f 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -531,9 +531,6 @@ static void mxsfb_enable_controller(struct fb_info *fb_info) pm_runtime_get_sync(&host->pdev->dev); - clk_enable_axi(host); - clk_enable_disp_axi(host); - /* the pixel clock should be disabled before * trying to set its clock rate successfully. */ @@ -594,8 +591,6 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) if (host->dispdrv && host->dispdrv->drv->disable) host->dispdrv->drv->disable(host->dispdrv, fb_info); - clk_enable_axi(host); - clk_enable_disp_axi(host); /* * Even if we disable the controller here, it will still continue * until its FIFOs are running out of data @@ -660,10 +655,6 @@ static int mxsfb_set_par(struct fb_info *fb_info) if (mxsfb_par_equal(fb_info, host)) return 0; - clk_enable_axi(host); - clk_enable_disp_axi(host); - clk_enable_pix(host); - dev_dbg(&host->pdev->dev, "%s\n", __func__); /* If fb is in blank mode, it is @@ -956,10 +947,6 @@ static int mxsfb_pan_display(struct fb_var_screeninfo *var, return -EINVAL; } - clk_enable_axi(host); - clk_enable_disp_axi(host); - clk_enable_pix(host); - offset = fb_info->fix.line_length * var->yoffset; if (down_timeout(&host->flip_sem, HZ / 2)) { @@ -1541,16 +1528,14 @@ static void mxsfb_shutdown(struct platform_device *pdev) struct fb_info *fb_info = platform_get_drvdata(pdev); struct mxsfb_info *host = to_imxfb_host(fb_info); - clk_enable_axi(host); - clk_enable_disp_axi(host); /* * Force stop the LCD controller as keeping it running during reboot * might interfere with the BootROM's boot mode pads sampling. */ - writel(CTRL_RUN, host->base + LCDC_CTRL + REG_CLR); - writel(CTRL_MASTER, host->base + LCDC_CTRL + REG_CLR); - clk_disable_disp_axi(host); - clk_disable_axi(host); + if (host->cur_blank == FB_BLANK_UNBLANK) { + writel(CTRL_RUN, host->base + LCDC_CTRL + REG_CLR); + writel(CTRL_MASTER, host->base + LCDC_CTRL + REG_CLR); + } } #ifdef CONFIG_PM_RUNTIME |