[PATCH 2/3] clocksource/drivers/timer-vt8500: Add watchdog functionality

Krzysztof Kozlowski krzk at kernel.org
Tue May 6 21:33:20 PDT 2025


On 06/05/2025 22:06, Alexey Charkov wrote:
> VIA/WonderMedia system timer IP can generate a watchdog reset when its
> clocksource counter matches the value in the match register 0 and
> watchdog function is enabled. For this to work, obvously the clock event
> device must use a different match register (1~3) and respective interrupt.
> 
> Check if at least two interrupts are provided by the device tree, then use
> match register 1 for system clock events and match register 0 for watchdog
> respectively.
> 
> Signed-off-by: Alexey Charkov <alchark at gmail.com>
> ---
>  drivers/clocksource/Kconfig        |  6 +++-
>  drivers/clocksource/timer-vt8500.c | 58 ++++++++++++++++++++++++++++++++++----
>  2 files changed, 58 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 487c8525996724fbf9c6e9726dabb478d86513b9..e4f9aade058af1adc279274c6c711658f9f4cd0a 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -177,9 +177,13 @@ config TEGRA186_TIMER
>  
>  config VT8500_TIMER
>  	bool "VT8500 timer driver" if COMPILE_TEST
> +	depends on ARCH_VT8500 || COMPILE_TEST

Does not look related to this patch.

>  	depends on HAS_IOMEM
> +	select WATCHDOG

Drivers are not supposed to select user-visible symbols.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list