ARM: imx: clk-pllv3: improve the timeout waiting method
authorPeter Chen <peter.chen@freescale.com>
Tue, 16 Jul 2013 02:23:20 +0000 (10:23 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Fri, 16 Aug 2013 05:11:25 +0000 (13:11 +0800)
commit0a036388529477bcce01226a8ba901ef16333393
treeb08aad976a9fb403d7a6a8dece1fb54781d4456b
parentdfd871442e37d8563d2fe16fe65e6507fd3071fa
ARM: imx: clk-pllv3: improve the timeout waiting method

There are two improvements for this commit:

- Add comparing pll lock condition after while loop. It can
fix potential fake timeout problem caused by the code is just
scheduled out before compare the timeout, and the time of
scheduling out are more than one jiffies.

- Move timeout assignment more close to compare the timeout.
It can reduce the possibility the code is scheduled out, and
the timeout can be more precise.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/mach-imx/clk-pllv3.c