Thread (10 messages) 10 messages, 2 authors, 2025-05-07

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

From: Alexey Charkov <alchark@gmail.com>
Date: 2025-05-07 05:47:09
Also in: linux-devicetree, lkml

On Wed, May 7, 2025 at 8:33 AM Krzysztof Kozlowski [off-list ref] wrote:
On 06/05/2025 22:06, Alexey Charkov wrote:
quoted
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@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.
Will drop in v2.
quoted
      depends on HAS_IOMEM
+     select WATCHDOG
Drivers are not supposed to select user-visible symbols.
Fair enough, thanks. Will add a separate nested user selectable option
for the watchdog function and make it depend on both the driver itself
and the watchdog core.

Best regards,
Alexey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help