[PATCHv2 1/3] watchdog: sama5d4: fix shared IRQ and hardcoded timeout issues
Guenter Roeck
linux at roeck-us.net
Mon Jun 8 15:35:24 PDT 2026
On 6/8/26 13:09, Rosen Penev wrote:
> Fix three pre-existing issues in the sama5d4 watchdog driver:
>
> 1. Unsafe IRQF_SHARED | IRQF_NO_SUSPEND combination: The watchdog
> interrupt is a dedicated peripheral line, not shared with other
> devices.
>
Not addressed in this patch, and can not be addressed without testing
on real hardware. We'll have to leave that alone.
> 2. Unconditional IRQ_HANDLED on shared line: The handler returned
> IRQ_HANDLED even when the status register indicated no watchdog
> interrupt was pending. Return IRQ_NONE in that case so the kernel
> can properly detect spurious interrupts on the line.
>
> 3. Hardcoded 16-second timeout: sama5d4_wdt_init() unconditionally
> used WDT_DEFAULT_TIMEOUT (16s) for the hardware timeout, ignoring
> any timeout configured via device tree (watchdog_init_timeout) or
> userspace. Pass wdd->timeout to sama5d4_wdt_init() so the
> configured timeout is honored during probe and resume.
>
While I think this is a real problem, changing the code would require
testing on real hardware. We'll have to leave this alone.
Please resubmit, only fixing issue 2). Please list the other problems as
explicitly not fixed in the summary e-mail.
This also applies to the new problem regarding AT91_WDT_WDDIS vs.
AT91_SAM9X60_WDDIS. If that is a real problem, it can only be fixed
by someone with access to hardware and with chip knowledge.
Besides that, I would suggest to re-order the patches.
Patch 3 (the null pointer fix) should be first, followed by this patch.
Patch 2 should be last.
Thanks,
Guenter
More information about the linux-arm-kernel
mailing list