]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite92cae9f82930a816053668a5f9a3c8b6fd750b2
tree991d9b544577e2ed0f87e9c92edf400bdcdf4df0
parent1372dac0367f9e37512ea4720cf3886bcb42562d
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: 3241afa3eefd ("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