clk: sunxi-ng: Fix inverted test condition in ccu_helper_wait_for_lock
authorChen-Yu Tsai <wens@csie.org>
Tue, 26 Jul 2016 07:04:23 +0000 (15:04 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 8 Aug 2016 17:27:33 +0000 (19:27 +0200)
commit156ad0d7eae4825a0d94a4bf68571e97302f2501
tree0df7832c241ef24add6cb62d8f59ac77a72ad18e
parentfbe359f12ce40e3126bea959b135656e4a305897
clk: sunxi-ng: Fix inverted test condition in ccu_helper_wait_for_lock

The condition passed to read*_poll_timeout() is the break condition,
i.e. wait for this condition to happen and return success.

The original code assumed the opposite, resulting in a warning when
the PLL clock rate was changed but never lost it's lock as far as
the readout indicated. This was verified by checking the read out
register value.

Fixes: 1d80c14248d6 ("clk: sunxi-ng: Add common infrastructure")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/clk/sunxi-ng/ccu_common.c