aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-06-27 04:51:26 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-06-29 02:09:17 -0400
commitf11766d1c210aca50e772f55457fea113d8f511a (patch)
treefb05b55a918eef396c3f2345b8911be6c1598439 /drivers
parent7df913b352327bd03c2a5f2e3e6d926184bd17af (diff)
OMAPDSS: add clk_prepare_enable and clk_disable_unprepare
In preparation of OMAP moving to Common Clk Framework(CCF) change clk_enable() and clk_disable() calls to clk_prepare_enable() and clk_disable_unprepare() in omapdss. This can be safely done, as omapdss never enables or disables clocks in atomic context. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: <linux-fbdev@vger.kernel.org> Cc: Paul Walmsley <paul@pwsan.com> Cc: Mike Turquette <mturquette@linaro.org> [tomi.valkeinen@ti.com: updated patch description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/dsi.c4
-rw-r--r--drivers/video/omap2/dss/hdmi.c4
-rw-r--r--drivers/video/omap2/dss/venc.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index ca8382d346e..423ef6afa9e 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1085,9 +1085,9 @@ static inline void dsi_enable_pll_clock(struct platform_device *dsidev,
1085 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 1085 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
1086 1086
1087 if (enable) 1087 if (enable)
1088 clk_enable(dsi->sys_clk); 1088 clk_prepare_enable(dsi->sys_clk);
1089 else 1089 else
1090 clk_disable(dsi->sys_clk); 1090 clk_disable_unprepare(dsi->sys_clk);
1091 1091
1092 if (enable && dsi->pll_locked) { 1092 if (enable && dsi->pll_locked) {
1093 if (wait_for_bit_change(dsidev, DSI_PLL_STATUS, 1, 1) != 1) 1093 if (wait_for_bit_change(dsidev, DSI_PLL_STATUS, 1, 1) != 1)
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 8195c7166d2..b9424b3c8d4 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -785,7 +785,7 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
785 785
786static int hdmi_runtime_suspend(struct device *dev) 786static int hdmi_runtime_suspend(struct device *dev)
787{ 787{
788 clk_disable(hdmi.sys_clk); 788 clk_disable_unprepare(hdmi.sys_clk);
789 789
790 dispc_runtime_put(); 790 dispc_runtime_put();
791 791
@@ -800,7 +800,7 @@ static int hdmi_runtime_resume(struct device *dev)
800 if (r < 0) 800 if (r < 0)
801 return r; 801 return r;
802 802
803 clk_enable(hdmi.sys_clk); 803 clk_prepare_enable(hdmi.sys_clk);
804 804
805 return 0; 805 return 0;
806} 806}
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2b8973931ff..fd3744059e5 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -930,7 +930,7 @@ static int __exit omap_venchw_remove(struct platform_device *pdev)
930static int venc_runtime_suspend(struct device *dev) 930static int venc_runtime_suspend(struct device *dev)
931{ 931{
932 if (venc.tv_dac_clk) 932 if (venc.tv_dac_clk)
933 clk_disable(venc.tv_dac_clk); 933 clk_disable_unprepare(venc.tv_dac_clk);
934 934
935 dispc_runtime_put(); 935 dispc_runtime_put();
936 936
@@ -946,7 +946,7 @@ static int venc_runtime_resume(struct device *dev)
946 return r; 946 return r;
947 947
948 if (venc.tv_dac_clk) 948 if (venc.tv_dac_clk)
949 clk_enable(venc.tv_dac_clk); 949 clk_prepare_enable(venc.tv_dac_clk);
950 950
951 return 0; 951 return 0;
952} 952}