[PATCH v8] watchdog: Add ARM TWD (MPCore private) watchdog driver
Guenter Roeck
linux at roeck-us.net
Sat Nov 21 07:21:45 PST 2026
Hi,
On 11/21/26 03:33, Fil Dunsky via B4 Relay wrote:
> From: Fil Dunsky <filipp.dunsky at gmail.com>
>
> ARM11 MPCore, Cortex-A5 and Cortex-A9 MPCore systems have a watchdog
> next to the local timer of every CPU, banked at the same address. The
> binding "arm,cortex-a9-twd-wdt" exists, but there has been no driver
> since mpcore_wdt was removed in v3.11, among other reasons because it
> only ever programmed the CPU that ran the ioctl.
>
...
> + {
> + guard(mutex)(&wdt->lock);
> +
> + if (wdt->freq_changing || seq != atomic_read(&wdt->freq_changes))
> + continue;
> + twd_wdt_call(wdt, twd_wdt_cpu_calibrate);
> + rate = wdt->sampled_rate;
> + }
> + if (!rate)
> + return dev_err_probe(dev, -EINVAL, "failed to calibrate watchdog clock\n");
> + if (cpufreq_get(TWD_WDT_CPU) != freq)
> + continue;
> + {
> + guard(mutex)(&wdt->lock);
> +
This looks like use cases for scoped_guard(). Is there a reason
for not using it ?
Thanks,
Guenter
More information about the linux-arm-kernel
mailing list