summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi-ng/ccu_common.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-07-14 10:42:35 +0800
committerStephen Boyd <sboyd@codeaurora.org>2016-08-10 15:07:01 -0700
commited0ab110235c659fdb3f73d27907b1b45b89cf30 (patch)
tree991d9b544577e2ed0f87e9c92edf400bdcdf4df0 /drivers/clk/sunxi-ng/ccu_common.c
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadlinux-ed0ab110235c659fdb3f73d27907b1b45b89cf30.tar.bz2
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>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu_common.c')
-rw-r--r--drivers/clk/sunxi-ng/ccu_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_common.c b/drivers/clk/sunxi-ng/ccu_common.c
index fc17b5295e16..51d4bac97ab3 100644
--- a/drivers/clk/sunxi-ng/ccu_common.c
+++ b/drivers/clk/sunxi-ng/ccu_common.c
@@ -31,7 +31,7 @@ void ccu_helper_wait_for_lock(struct ccu_common *common, u32 lock)
return;
WARN_ON(readl_relaxed_poll_timeout(common->base + common->reg, reg,
- !(reg & lock), 100, 70000));
+ reg & lock, 100, 70000));
}
int sunxi_ccu_probe(struct device_node *node, void __iomem *reg,