All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
@ 2019-12-09  8:19 ` Peng Fan
  0 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2019-12-09  8:19 UTC (permalink / raw)
  To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
  Cc: kernel, dl-linux-imx, Aisheng Dong, linux-clk, linux-arm-kernel,
	linux-kernel, Leonard Crestez, Peng Fan, stable

From: Peng Fan <peng.fan@nxp.com>

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>
---

V2:
 Update commit log, and add tag.

 drivers/clk/imx/clk-pll14xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index a6d31a7262ef..e2384271ed83 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -166,7 +166,7 @@ static int clk_pll14xx_wait_lock(struct clk_pll14xx *pll)
 {
 	u32 val;
 
-	return readl_poll_timeout(pll->base, val, val & LOCK_TIMEOUT_US, 0,
+	return readl_poll_timeout(pll->base, val, val & LOCK_STATUS, 0,
 			LOCK_TIMEOUT_US);
 }
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
@ 2019-12-09  8:19 ` Peng Fan
  0 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2019-12-09  8:19 UTC (permalink / raw)
  To: sboyd, shawnguo, s.hauer, festevam, Abel Vesa
  Cc: Aisheng Dong, Peng Fan, linux-kernel, stable, dl-linux-imx,
	kernel, Leonard Crestez, linux-clk, linux-arm-kernel

From: Peng Fan <peng.fan@nxp.com>

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>
---

V2:
 Update commit log, and add tag.

 drivers/clk/imx/clk-pll14xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index a6d31a7262ef..e2384271ed83 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -166,7 +166,7 @@ static int clk_pll14xx_wait_lock(struct clk_pll14xx *pll)
 {
 	u32 val;
 
-	return readl_poll_timeout(pll->base, val, val & LOCK_TIMEOUT_US, 0,
+	return readl_poll_timeout(pll->base, val, val & LOCK_STATUS, 0,
 			LOCK_TIMEOUT_US);
 }
 
-- 
2.16.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
  2019-12-09  8:19 ` Peng Fan
@ 2019-12-11  7:07   ` Shawn Guo
  -1 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2019-12-11  7:07 UTC (permalink / raw)
  To: Peng Fan
  Cc: sboyd, s.hauer, festevam, Abel Vesa, kernel, dl-linux-imx,
	Aisheng Dong, linux-clk, linux-arm-kernel, linux-kernel,
	Leonard Crestez, stable

On Mon, Dec 09, 2019 at 08:19:55AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
@ 2019-12-11  7:07   ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2019-12-11  7:07 UTC (permalink / raw)
  To: Peng Fan
  Cc: Aisheng Dong, Abel Vesa, sboyd, s.hauer, linux-kernel, stable,
	dl-linux-imx, kernel, Leonard Crestez, festevam, linux-clk,
	linux-arm-kernel

On Mon, Dec 09, 2019 at 08:19:55AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> 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>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-11  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09  8:19 [PATCH V2] clk: imx: pll14xx: fix clk_pll14xx_wait_lock Peng Fan
2019-12-09  8:19 ` Peng Fan
2019-12-11  7:07 ` Shawn Guo
2019-12-11  7:07   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.