Commit f3646582 authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAP: DSS2: remove unneeded fck enable/disables

Now that the HWMOD fmwk handles the fcks of DSS modules properly, the
DSS driver no longer needs to explicitely enable/disable the fck.

This patch removes the enables/disables of fck from dispc, dsi and dss.
The clk_get(fck) is still needed there, as the modules need to know the
frequency of the clock.

For hdmi and venc this patch also removes the clk_get(fck), as they
don't need the clock at all.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 3393b853
...@@ -3480,7 +3480,6 @@ static int omap_dispchw_remove(struct platform_device *pdev) ...@@ -3480,7 +3480,6 @@ static int omap_dispchw_remove(struct platform_device *pdev)
static int dispc_runtime_suspend(struct device *dev) static int dispc_runtime_suspend(struct device *dev)
{ {
dispc_save_context(); dispc_save_context();
clk_disable(dispc.dss_clk);
dss_runtime_put(); dss_runtime_put();
return 0; return 0;
...@@ -3494,7 +3493,6 @@ static int dispc_runtime_resume(struct device *dev) ...@@ -3494,7 +3493,6 @@ static int dispc_runtime_resume(struct device *dev)
if (r < 0) if (r < 0)
return r; return r;
clk_enable(dispc.dss_clk);
dispc_restore_context(); dispc_restore_context();
return 0; return 0;
......
...@@ -4605,10 +4605,6 @@ static int omap_dsi1hw_remove(struct platform_device *dsidev) ...@@ -4605,10 +4605,6 @@ static int omap_dsi1hw_remove(struct platform_device *dsidev)
static int dsi_runtime_suspend(struct device *dev) static int dsi_runtime_suspend(struct device *dev)
{ {
struct dsi_data *dsi = dsi_get_dsidrv_data(to_platform_device(dev));
clk_disable(dsi->dss_clk);
dispc_runtime_put(); dispc_runtime_put();
dss_runtime_put(); dss_runtime_put();
...@@ -4617,7 +4613,6 @@ static int dsi_runtime_suspend(struct device *dev) ...@@ -4617,7 +4613,6 @@ static int dsi_runtime_suspend(struct device *dev)
static int dsi_runtime_resume(struct device *dev) static int dsi_runtime_resume(struct device *dev)
{ {
struct dsi_data *dsi = dsi_get_dsidrv_data(to_platform_device(dev));
int r; int r;
r = dss_runtime_get(); r = dss_runtime_get();
...@@ -4628,8 +4623,6 @@ static int dsi_runtime_resume(struct device *dev) ...@@ -4628,8 +4623,6 @@ static int dsi_runtime_resume(struct device *dev)
if (r) if (r)
goto err_get_dispc; goto err_get_dispc;
clk_enable(dsi->dss_clk);
return 0; return 0;
err_get_dispc: err_get_dispc:
......
...@@ -819,13 +819,11 @@ static int omap_dsshw_remove(struct platform_device *pdev) ...@@ -819,13 +819,11 @@ static int omap_dsshw_remove(struct platform_device *pdev)
static int dss_runtime_suspend(struct device *dev) static int dss_runtime_suspend(struct device *dev)
{ {
dss_save_context(); dss_save_context();
clk_disable(dss.dss_clk);
return 0; return 0;
} }
static int dss_runtime_resume(struct device *dev) static int dss_runtime_resume(struct device *dev)
{ {
clk_enable(dss.dss_clk);
dss_restore_context(); dss_restore_context();
return 0; return 0;
} }
......
...@@ -56,7 +56,6 @@ static struct { ...@@ -56,7 +56,6 @@ static struct {
struct hdmi_config cfg; struct hdmi_config cfg;
struct clk *sys_clk; struct clk *sys_clk;
struct clk *hdmi_clk;
} hdmi; } hdmi;
/* /*
...@@ -1704,15 +1703,6 @@ static int hdmi_get_clocks(struct platform_device *pdev) ...@@ -1704,15 +1703,6 @@ static int hdmi_get_clocks(struct platform_device *pdev)
hdmi.sys_clk = clk; hdmi.sys_clk = clk;
clk = clk_get(&pdev->dev, "fck");
if (IS_ERR(clk)) {
DSSERR("can't get fck\n");
clk_put(hdmi.sys_clk);
return PTR_ERR(clk);
}
hdmi.hdmi_clk = clk;
return 0; return 0;
} }
...@@ -1720,8 +1710,6 @@ static void hdmi_put_clocks(void) ...@@ -1720,8 +1710,6 @@ static void hdmi_put_clocks(void)
{ {
if (hdmi.sys_clk) if (hdmi.sys_clk)
clk_put(hdmi.sys_clk); clk_put(hdmi.sys_clk);
if (hdmi.hdmi_clk)
clk_put(hdmi.hdmi_clk);
} }
/* HDMI HW IP initialisation */ /* HDMI HW IP initialisation */
...@@ -1792,7 +1780,6 @@ static int omapdss_hdmihw_remove(struct platform_device *pdev) ...@@ -1792,7 +1780,6 @@ static int omapdss_hdmihw_remove(struct platform_device *pdev)
static int hdmi_runtime_suspend(struct device *dev) static int hdmi_runtime_suspend(struct device *dev)
{ {
clk_disable(hdmi.hdmi_clk);
clk_disable(hdmi.sys_clk); clk_disable(hdmi.sys_clk);
dispc_runtime_put(); dispc_runtime_put();
...@@ -1815,7 +1802,6 @@ static int hdmi_runtime_resume(struct device *dev) ...@@ -1815,7 +1802,6 @@ static int hdmi_runtime_resume(struct device *dev)
clk_enable(hdmi.sys_clk); clk_enable(hdmi.sys_clk);
clk_enable(hdmi.hdmi_clk);
return 0; return 0;
......
...@@ -295,7 +295,6 @@ static struct { ...@@ -295,7 +295,6 @@ static struct {
u32 wss_data; u32 wss_data;
struct regulator *vdda_dac_reg; struct regulator *vdda_dac_reg;
struct clk *tv_clk;
struct clk *tv_dac_clk; struct clk *tv_dac_clk;
} venc; } venc;
...@@ -732,19 +731,10 @@ static int venc_get_clocks(struct platform_device *pdev) ...@@ -732,19 +731,10 @@ static int venc_get_clocks(struct platform_device *pdev)
{ {
struct clk *clk; struct clk *clk;
clk = clk_get(&pdev->dev, "fck");
if (IS_ERR(clk)) {
DSSERR("can't get fck\n");
return PTR_ERR(clk);
}
venc.tv_clk = clk;
if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) { if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) {
clk = clk_get(&pdev->dev, "tv_dac_clk"); clk = clk_get(&pdev->dev, "tv_dac_clk");
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
DSSERR("can't get tv_dac_clk\n"); DSSERR("can't get tv_dac_clk\n");
clk_put(venc.tv_clk);
return PTR_ERR(clk); return PTR_ERR(clk);
} }
} else { } else {
...@@ -758,8 +748,6 @@ static int venc_get_clocks(struct platform_device *pdev) ...@@ -758,8 +748,6 @@ static int venc_get_clocks(struct platform_device *pdev)
static void venc_put_clocks(void) static void venc_put_clocks(void)
{ {
if (venc.tv_clk)
clk_put(venc.tv_clk);
if (venc.tv_dac_clk) if (venc.tv_dac_clk)
clk_put(venc.tv_dac_clk); clk_put(venc.tv_dac_clk);
} }
...@@ -835,7 +823,6 @@ static int venc_runtime_suspend(struct device *dev) ...@@ -835,7 +823,6 @@ static int venc_runtime_suspend(struct device *dev)
{ {
if (venc.tv_dac_clk) if (venc.tv_dac_clk)
clk_disable(venc.tv_dac_clk); clk_disable(venc.tv_dac_clk);
clk_disable(venc.tv_clk);
dispc_runtime_put(); dispc_runtime_put();
dss_runtime_put(); dss_runtime_put();
...@@ -855,7 +842,6 @@ static int venc_runtime_resume(struct device *dev) ...@@ -855,7 +842,6 @@ static int venc_runtime_resume(struct device *dev)
if (r < 0) if (r < 0)
goto err_get_dispc; goto err_get_dispc;
clk_enable(venc.tv_clk);
if (venc.tv_dac_clk) if (venc.tv_dac_clk)
clk_enable(venc.tv_dac_clk); clk_enable(venc.tv_dac_clk);
......
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