[media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 31 May 2013 11:40:36 +0000 (08:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 8 Jun 2013 22:53:16 +0000 (19:53 -0300)
commitb4155d7d5b2c4e82238d629c451f7c27c9f37d9c
tree8ac568ea27b7786ddd68bf408fb2ed6e7b1d6aa2
parent3cf138a6393d4ae2aeabce4c4b776d7d15cce69b
[media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured

Use clk_prepare_enable/clk_unprepare_disable instead of preparing the
clocks during the driver initalization and then using just clk_disable/
clk_enable. The clock framework doesn't guarantee a clock will not get
enabled during e.g. clk_set_parent if clk_prepare has been called on it.
So we ensure clk_prepare() is called only when it is safe to enable
the clocks, i.e. the parent clocks and the clocks' frequencies are set.
It must be ensured the FIMC-IS clocks have proper frequencies before they
are enabled, otherwise the whole system will hang.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyunmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/exynos4-is/fimc-is.c