<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/clocksource/timer-tegra186.c, branch v7.2-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-10T05:25:54+00:00</updated>
<entry>
<title>clocksource/drivers/timer-tegra186: Reserve and service a kernel watchdog</title>
<updated>2026-06-10T05:25:54+00:00</updated>
<author>
<name>Kartik Rajput</name>
<email>kkartik@nvidia.com</email>
</author>
<published>2026-05-07T15:45:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46fb093b87a0d92e391b6f6cadd63c3ef50a59b2'/>
<id>urn:sha1:46fb093b87a0d92e391b6f6cadd63c3ef50a59b2</id>
<content type='text'>
Tegra SoCs supports multiple watchdog timers. If the kernel crashes or
hangs before userspace enables a watchdog, the system cannot recover and
may remain bricked, e.g. after a failed OTA update. The driver currently
leaves all watchdogs disabled until userspace configures them.

Reserve first available watchdog as a kernel-only watchdog for Tegra186
and Tegra234. Arm it during probe (120s timeout) and keep it alive in
the driver IRQ handler. Do not register it to userspace. Other available
watchdogs remain exposed to userspace. This guarantees the system can
reset itself in case of a hang or crash even when userspace never starts.

Signed-off-by: Kartik Rajput &lt;kkartik@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://patch.msgid.link/20260507154557.2082697-5-kkartik@nvidia.com
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Register all accessible watchdog timers</title>
<updated>2026-06-10T05:25:40+00:00</updated>
<author>
<name>Kartik Rajput</name>
<email>kkartik@nvidia.com</email>
</author>
<published>2026-05-07T15:45:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5eb5d8eaeacf09f924458dacd590b7f9b1607cea'/>
<id>urn:sha1:5eb5d8eaeacf09f924458dacd590b7f9b1607cea</id>
<content type='text'>
Tegra186+ SoCs expose multiple watchdog timers, but the driver only
registers WDT(0).

Iterate over num_wdts and, for each WDT, check the SCR (firewall) registers
in the TKE block to determine whether Linux has read and write access.
Register the watchdogs that are accessible.

Signed-off-by: Kartik Rajput &lt;kkartik@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://patch.msgid.link/20260507154557.2082697-4-kkartik@nvidia.com
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Correct num_wdts for Tegra186 and Tegra234</title>
<updated>2026-06-10T05:25:26+00:00</updated>
<author>
<name>Kartik Rajput</name>
<email>kkartik@nvidia.com</email>
</author>
<published>2026-05-07T15:45:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=341305ea9c89a55c55c0d6252541e5d01098a00a'/>
<id>urn:sha1:341305ea9c89a55c55c0d6252541e5d01098a00a</id>
<content type='text'>
On Tegra186 and Tegra234, WDT2 is connected to the Audio Processing
Engine (APE) and cannot be accessed from Linux. Only WDT0 and WDT1
are accessible to Linux.

Update num_wdts from 3 to 2 for both Tegra186 and Tegra234 to reflect
the actual number of watchdogs available to Linux.

Signed-off-by: Kartik Rajput &lt;kkartik@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://patch.msgid.link/20260507154557.2082697-3-kkartik@nvidia.com
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Fix support for multiple watchdog instances</title>
<updated>2026-06-10T05:25:08+00:00</updated>
<author>
<name>Kartik Rajput</name>
<email>kkartik@nvidia.com</email>
</author>
<published>2026-05-07T15:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca57bf46e7a94f8c53d05c376df9fcfdcb482100'/>
<id>urn:sha1:ca57bf46e7a94f8c53d05c376df9fcfdcb482100</id>
<content type='text'>
Tegra SoCs support multiple watchdogs; currently only one (WDT0) is
used. When multiple watchdogs are registered, tegra186_wdt_enable()
overwrites the TKEIE(x) register, discarding any existing watchdog
interrupt enable bits. As a result, enabling one watchdog inadvertently
disables interrupts for the others.

Fix this by preserving the existing TKEIE(x) value and updating it
using a read-modify-write sequence.

Fixes: 42cee19a9f83 ("clocksource: Add Tegra186 timers support")
Cc: stable@vger.kernel.org
Signed-off-by: Kartik Rajput &lt;kkartik@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://patch.msgid.link/20260507154557.2082697-2-kkartik@nvidia.com
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Don't print superfluous errors</title>
<updated>2025-09-23T10:41:39+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2025-08-13T19:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=764d0654114b5ce52aafabdb2bf9ccee0e998651'/>
<id>urn:sha1:764d0654114b5ce52aafabdb2bf9ccee0e998651</id>
<content type='text'>
The watchdog core will handle error messages already.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Link: https://lore.kernel.org/r/20250813190657.3628-2-wsa+renesas@sang-engineering.com
</content>
</entry>
<entry>
<title>clocksource/drivers/tegra186: Avoid 64-bit division</title>
<updated>2025-09-23T08:55:12+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2025-06-20T11:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=409f8fe03e08f92bf5be96cedbcd7a3e8fb2eeaf'/>
<id>urn:sha1:409f8fe03e08f92bf5be96cedbcd7a3e8fb2eeaf</id>
<content type='text'>
The newly added function causes a build failure on 32-bit targets with
older compiler version such as gcc-10:

arm-linux-gnueabi-ld: drivers/clocksource/timer-tegra186.o: in function `tegra186_wdt_get_timeleft':
timer-tegra186.c:(.text+0x3c2): undefined reference to `__aeabi_uldivmod'

The calculation can trivially be changed to avoid the division entirely,
as USEC_PER_SEC is a multiple of 5. Change both such calculation for
consistency, even though gcc apparently managed to optimize the other one
properly already.

[dlezcano : Fixed conflict with 20250614175556.922159-2-linux@roeck-us.net ]

Fixes: 28c842c8b0f5 ("clocksource/drivers/timer-tegra186: Add WDIOC_GETTIMELEFT support")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20250620111939.3395525-1-arnd@kernel.org
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Simplify calculating timeleft</title>
<updated>2025-09-23T08:54:58+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2025-06-14T17:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f3abae5b447a7f8458a0f58a003c11c46aade99'/>
<id>urn:sha1:7f3abae5b447a7f8458a0f58a003c11c46aade99</id>
<content type='text'>
It is not necessary to use 64-bit operations to calculate the
remaining watchdog timeout. Simplify to use 32-bit operations,
and add comments explaining why there will be no overflow.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Cc: Pohsun Su &lt;pohsuns@nvidia.com&gt;
Cc: Robert Lin &lt;robelin@nvidia.com&gt;
Link: https://lore.kernel.org/r/20250614175556.922159-2-linux@roeck-us.net
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Avoid 64-bit divide operation</title>
<updated>2025-09-23T08:54:29+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2025-06-14T17:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=916aa36042db8ee230543ffe0d192f900e8b8c9f'/>
<id>urn:sha1:916aa36042db8ee230543ffe0d192f900e8b8c9f</id>
<content type='text'>
Building the driver on xtensa fails with

tensa-linux-ld: drivers/clocksource/timer-tegra186.o:
	in function `tegra186_timer_remove':
timer-tegra186.c:(.text+0x350):
	undefined reference to `__udivdi3'

Avoid the problem by rearranging the offending code to avoid the 64-bit
divide operation.

Fixes: 28c842c8b0f5 ("clocksource/drivers/timer-tegra186: Add WDIOC_GETTIMELEFT support")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Cc: Pohsun Su &lt;pohsuns@nvidia.com&gt;
Cc: Robert Lin &lt;robelin@nvidia.com&gt;
Link: https://lore.kernel.org/r/20250614175556.922159-1-linux@roeck-us.net
</content>
</entry>
<entry>
<title>clocksource/drivers/tegra186: Add module owner</title>
<updated>2025-09-23T08:52:04+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2025-06-02T15:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afe904f5091e2ceaa95b451f61a115a0224e8e38'/>
<id>urn:sha1:afe904f5091e2ceaa95b451f61a115a0224e8e38</id>
<content type='text'>
The conversion to modules requires a correct handling of the module
refcount in order to prevent to unload it if it is in use. That is
especially true with the clockevents where there is no function to
unregister them.

The core time framework correctly handles the module refcount with the
different clocksource and clockevents if the module owner is set.

Add the module owner to make sure the core framework will prevent
stupid things happening when the driver will be converted into a
module.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Will McVicker &lt;willmcvicker@google.com&gt;
Link: https://lore.kernel.org/r/20250602151853.1942521-5-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>clocksource/drivers/timer-tegra186: Remove unused bits</title>
<updated>2025-05-16T09:10:33+00:00</updated>
<author>
<name>robelin</name>
<email>robelin@nvidia.com</email>
</author>
<published>2025-05-07T04:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39b27ddf4d680fc908b2fc788039406e2e1c4601'/>
<id>urn:sha1:39b27ddf4d680fc908b2fc788039406e2e1c4601</id>
<content type='text'>
The intention to keep the unsed if(0) block is gone now. Remove
them for clean codes.

Signed-off-by: robelin &lt;robelin@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://lore.kernel.org/r/20250507044311.3751033-4-robelin@nvidia.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
