Commit 7e4920bf authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Helge Deller

video: fbdev: omap: Make it CCF clk API compatible

OMAP1 LCDC drivers now omit clk_prepare/unprepare() steps, not supported
by OMAP1 custom implementation of clock API.  However, non-CCF stubs of
those functions exist for use on such platforms until converted to CCF.

Update the drivers to be compatible with CCF implementation of clock API.
Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 2a8f0934
...@@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0) if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0)
goto err3; goto err3;
hwa742.extif->set_timings(&hwa742.reg_timings); hwa742.extif->set_timings(&hwa742.reg_timings);
clk_enable(hwa742.sys_ck); clk_prepare_enable(hwa742.sys_ck);
calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk); calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk);
if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0) if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0)
...@@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
return 0; return 0;
err4: err4:
clk_disable(hwa742.sys_ck); clk_disable_unprepare(hwa742.sys_ck);
err3: err3:
hwa742.extif->cleanup(); hwa742.extif->cleanup();
err2: err2:
...@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void) ...@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void)
hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED); hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED);
hwa742.extif->cleanup(); hwa742.extif->cleanup();
hwa742.int_ctrl->cleanup(); hwa742.int_ctrl->cleanup();
clk_disable(hwa742.sys_ck); clk_disable_unprepare(hwa742.sys_ck);
} }
struct lcd_ctrl hwa742_ctrl = { struct lcd_ctrl hwa742_ctrl = {
......
...@@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
dev_err(fbdev->dev, "failed to adjust LCD rate\n"); dev_err(fbdev->dev, "failed to adjust LCD rate\n");
goto fail1; goto fail1;
} }
clk_enable(lcdc.lcd_ck); clk_prepare_enable(lcdc.lcd_ck);
r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev); r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
if (r) { if (r) {
...@@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
fail3: fail3:
free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
fail2: fail2:
clk_disable(lcdc.lcd_ck); clk_disable_unprepare(lcdc.lcd_ck);
fail1: fail1:
clk_put(lcdc.lcd_ck); clk_put(lcdc.lcd_ck);
fail0: fail0:
...@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void) ...@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void)
free_fbmem(); free_fbmem();
omap_free_lcd_dma(); omap_free_lcd_dma();
free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
clk_disable(lcdc.lcd_ck); clk_disable_unprepare(lcdc.lcd_ck);
clk_put(lcdc.lcd_ck); clk_put(lcdc.lcd_ck);
} }
......
...@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev)
l &= ~CONF_SOSSI_RESET_R; l &= ~CONF_SOSSI_RESET_R;
omap_writel(l, MOD_CONF_CTRL_1); omap_writel(l, MOD_CONF_CTRL_1);
clk_enable(sossi.fck); clk_prepare_enable(sossi.fck);
l = omap_readl(ARM_IDLECT2); l = omap_readl(ARM_IDLECT2);
l &= ~(1 << 8); /* DMACK_REQ */ l &= ~(1 << 8); /* DMACK_REQ */
omap_writel(l, ARM_IDLECT2); omap_writel(l, ARM_IDLECT2);
...@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev)
return 0; return 0;
err: err:
clk_disable(sossi.fck); clk_disable_unprepare(sossi.fck);
clk_put(sossi.fck); clk_put(sossi.fck);
return r; return r;
} }
...@@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev)
static void sossi_cleanup(void) static void sossi_cleanup(void)
{ {
omap_lcdc_free_dma_callback(); omap_lcdc_free_dma_callback();
clk_unprepare(sossi.fck);
clk_put(sossi.fck); clk_put(sossi.fck);
iounmap(sossi.base); iounmap(sossi.base);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment