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

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)
		goto err3;
	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);
	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,

	return 0;
err4:
	clk_disable(hwa742.sys_ck);
	clk_disable_unprepare(hwa742.sys_ck);
err3:
	hwa742.extif->cleanup();
err2:
@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void)
	hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED);
	hwa742.extif->cleanup();
	hwa742.int_ctrl->cleanup();
	clk_disable(hwa742.sys_ck);
	clk_disable_unprepare(hwa742.sys_ck);
}

struct lcd_ctrl hwa742_ctrl = {
+3 −3
Original line number Diff line number Diff line
@@ -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");
		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);
	if (r) {
@@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
fail3:
	free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
fail2:
	clk_disable(lcdc.lcd_ck);
	clk_disable_unprepare(lcdc.lcd_ck);
fail1:
	clk_put(lcdc.lcd_ck);
fail0:
@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void)
	free_fbmem();
	omap_free_lcd_dma();
	free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
	clk_disable(lcdc.lcd_ck);
	clk_disable_unprepare(lcdc.lcd_ck);
	clk_put(lcdc.lcd_ck);
}

+3 −2
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev)
	l &= ~CONF_SOSSI_RESET_R;
	omap_writel(l, MOD_CONF_CTRL_1);

	clk_enable(sossi.fck);
	clk_prepare_enable(sossi.fck);
	l = omap_readl(ARM_IDLECT2);
	l &= ~(1 << 8);			/* DMACK_REQ */
	omap_writel(l, ARM_IDLECT2);
@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev)
	return 0;

err:
	clk_disable(sossi.fck);
	clk_disable_unprepare(sossi.fck);
	clk_put(sossi.fck);
	return r;
}
@@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev)
static void sossi_cleanup(void)
{
	omap_lcdc_free_dma_callback();
	clk_unprepare(sossi.fck);
	clk_put(sossi.fck);
	iounmap(sossi.base);
}