clk: imx: pll14xx: fix clk_pll14xx_wait_lock
authorPeng Fan <peng.fan@nxp.com>
Mon, 9 Dec 2019 08:19:55 +0000 (08:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:46:15 +0000 (16:46 +0100)
commitbc8ccc0d4f5dabc82b0fef2c471d164d80b048dd
treea4f3d5a8fcd983c7ddbd4b8a7358ac01ad9bc884
parentee66712ed388df028243dbd9403596a326165613
clk: imx: pll14xx: fix clk_pll14xx_wait_lock

commit c3a5fd15ed0c1494435e4e35fbee734ae46b5073 upstream.

The usage of readl_poll_timeout is wrong, the 3rd parameter(cond)
should be "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US",
It is not check whether the pll locked, LOCK_STATUS reflects the mask,
not LOCK_TIMEOUT_US.

Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
Cc: <stable@vger.kernel.org>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/imx/clk-pll14xx.c