]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 20 Aug 2025 20:23:18 +0000 (21:23 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Fri, 12 Sep 2025 16:06:29 +0000 (18:06 +0200)
commit19f7eaec4d9d1dcd8b49e14dbad56a65810c2910
treeb5831461fab504f20be6d7b24e558312f997f8e4
parent5cacd26436a66e24b1f0335a5d2b71eed4ab0d74
watchdog: rzv2h: Obtain clock-divider and timeout values from OF match data

Update the rzv2h_wdt driver to fetch clock configuration and timeout
parameters from device tree match data rather than relying on hardcoded
constants. Introduce a new structure rzv2h_of_data that encapsulates
minimum and maximum clock select values (cks_min and cks_max), clock
divider (cks_div), timeout cycle count (timeout_cycles), and the
timeout period select bits (tops). These values are provided through
the OF match table and retrieved via of_device_get_match_data() during
probe.

This change allows dynamic configuration of the watchdog timer for
different SoCs, such as the RZ/T2H, which require different settings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/rzv2h_wdt.c