Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
@ 2019-11-06  5:31 Peng Fan
  2019-11-06  7:45 ` Abel Vesa
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan @ 2019-11-06  5:31 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

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

The usage of readl_poll_timeout is wrong, the cond should be
"val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US".

Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V1:
 Hi Shawn,
   This patch is made based on 5.4-rc6, not your for-next branch,
   not sure whether this patch could catch 5.4 release.

 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 7a815ec76aa5..d43b4a3c0de8 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -153,7 +153,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	[flat|nested] 2+ messages in thread

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

On 19-11-06 05:31:15, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> The usage of readl_poll_timeout is wrong, the cond should be
> "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US".
> 
> Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

> ---
> 
> V1:
>  Hi Shawn,
>    This patch is made based on 5.4-rc6, not your for-next branch,
>    not sure whether this patch could catch 5.4 release.
> 
>  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 7a815ec76aa5..d43b4a3c0de8 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -153,7 +153,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	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  5:31 [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock Peng Fan
2019-11-06  7:45 ` Abel Vesa

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git