Re: [PATCH v8 5/7] watchdog: rzv2h_wdt: Add syscon based WDTDCR access

From: Guenter Roeck

Date: Mon Nov 09 2026 - 18:29:17 EST


On Thu, Oct 01, 2026 at 05:51:59PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> On RZ/T2H and RZ/N2H, WDTDCR is located in the SYS block rather than the
> WDT register space. Allow the WDT driver to access it through the syscon
> regmap exposed by the CPG driver. Retain support for the existing second
> WDT register region for compatibility with older device trees.
>
> The syscon regmap uses locks and cannot be used from the watchdog restart
> handler, which runs in atomic context. Use the CPG helper for this path so
> WDTDCR can be accessed without taking a lock, while continuing to use the
> syscon regmap for normal start and stop operations.
>
> Keep the WDTDCR start and stop helpers as void and treat the regmap
> operations as best effort. Propagating errors from these MMIO-backed
> accesses would complicate the control flow and error handling, while
> the restart path in particular should make a best effort to restart
> the system.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>

For my reference:

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Thanks,
Guenter