Skip to content

Add support for Kernel WDT

Kartik Rajput linux-tegra linux-watchdog lkml stable 1 version Applied

Status from this message: The following commit has been merged into the timers/clocksource branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4clocksource/drivers/timer-tegra186: Fix support for multiple watchdog instancesdrivers/clocksource/timer-tegra186.c+2 -10 replies
2/4clocksource/drivers/timer-tegra186: Correct num_wdts for Tegra186 and Tegra234drivers/clocksource/timer-tegra186.c+2 -20 replies
3/4clocksource/drivers/timer-tegra186: Register all accessible watchdog timersdrivers/clocksource/timer-tegra186.c+50 -110 replies
4/4clocksource/drivers/timer-tegra186: Reserve and service a kernel watchdogdrivers/clocksource/timer-tegra186.c+54 -80 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJon Hunter
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Add support for Kernel WDT

Tegra186 and later SoCs support multiple watchdog timers in the TKE block, the driver so far only uses WDT0. This series extends it to make use of the additional instances and reserve the first available WDT for Kernel.

Patch 1 fixes a read-modify-write bug in tegra186_wdt_enable() that would otherwise make registering more than one watchdog unsafe.

Patch 2 corrects num_wdts for Tegra186 and Tegra234. WDT2 is connected to the Audio Processing Engine (APE) and cannot be accessed from Linux, so only WDT0 and WDT1 are available.

Patch 3 iterates over all WDTs and registers the ones whose TKE SCR firewall grants OS access.

Patch 4 reserves the first accessible watchdog as a kernel-only watchdog, arms it at probe with a 120 s timeout, and pets it from the driver's IRQ handler, it is not exposed to userspace, so the system can still reset if the kernel hangs before userspace opens a watchdog.

Kartik Rajput (4):
clocksource/drivers/timer-tegra186: Fix support for multiple watchdog
instances
clocksource/drivers/timer-tegra186: Correct num_wdts for Tegra186 and

    Tegra234

clocksource/drivers/timer-tegra186: Register all accessible watchdog
timers
clocksource/drivers/timer-tegra186: Reserve and service a kernel
watchdog

 drivers/clocksource/timer-tegra186.c | 122 +++++++++++++++++++++++----
 1 file changed, 104 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0