[PATCH v2] clk: zynq: return -ETIMEDOUT if the PLL never locks
Michal Simek
michal.simek at amd.com
Tue Nov 10 05:21:41 PST 2026
On 9/8/26 10:47, Linkai Gong wrote:
> zynq_pll_enable() waits for lock under a spinlock with no timeout.
> A stuck PLL would wedge the enable path with IRQs off.
>
> Poll with readl_poll_timeout_atomic() and return -ETIMEDOUT on
> failure. The 1 ms upper bound is a software limit for a stuck PLL,
> not a TRM-derived value; Zynq PLL lock is still expected well
> within that window.
>
> Changes in v2:
> - Use BIT(clk->lockbit)
> - Name the poll delay/timeout constants
> - Clarify the 1 ms bound in the commit message
>
> Fixes: 3682af46d55f ("clk: zynq: Factor out PLL driver")
> Signed-off-by: Linkai Gong <gonglinkai at kylinos.cn>
> ---
> drivers/clk/zynq/pll.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
Tested-by: Michal Simek <michal.simek at amd.com>
Thanks,
Michal
More information about the linux-arm-kernel
mailing list