clk: sunxi-ng: Fix inverted test condition in ccu_helper_wait_for_lock
authorChen-Yu Tsai <wens@csie.org>
Thu, 14 Jul 2016 02:42:35 +0000 (10:42 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 10 Aug 2016 22:07:01 +0000 (15:07 -0700)
commited0ab110235c659fdb3f73d27907b1b45b89cf30
tree991d9b544577e2ed0f87e9c92edf400bdcdf4df0
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
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: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/sunxi-ng/ccu_common.c