aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuxi <b36102@freescale.com>2011-10-24 14:22:16 +0800
committerJason Chen <b02280@freescale.com>2011-11-16 16:32:03 +0800
commit768659a7ae71103167f40625567d8f4d1c1c33bb (patch)
tree639de68b84c6ae1d5255d696400f7872847497aa
parent526436c4fe8136163e3d2bb5722a3e0f4ab0f6b7 (diff)
downloadlinux-linaro-768659a7ae71103167f40625567d8f4d1c1c33bb.tar.gz
ENGR00160626 fix system hang when ipu clk get rate
Enable ipu clk when try get rate Signed-off-by: Yuxi Sun <b36102@freescale.com>
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index 9094fc64f10..9f338107124 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -59,7 +59,12 @@ static inline struct ipu_soc *pixelclk2ipu(struct clk *clk)
static unsigned long _ipu_pixel_clk_get_rate(struct clk *clk)
{
struct ipu_soc *ipu = pixelclk2ipu(clk);
- u32 div = ipu_di_read(ipu, clk->id, DI_BS_CLKGEN0);
+ u32 div;
+
+ _ipu_get(ipu);
+ div = ipu_di_read(ipu, clk->id, DI_BS_CLKGEN0);
+ _ipu_put(ipu);
+
if (div == 0)
return 0;
return (clk_get_rate(clk->parent) * 16) / div;