10 Commits

Author SHA1 Message Date
Jon Hunter
96cae7f9de drivers: Fix from_timer() for Linux v6.16
In Linux v6.16, commit 41cb08555c41 ("treewide, timers: Rename
from_timer() to timer_container_of()") renamed 'from_timer()' to
'timer_container_of()'. Given that this is a macro we can simplfy see if
the macro 'timer_container_of' is defined and if so use this otherwise
fall back to 'from_timer()'. Update the necessary drivers to fix the
build for Linux v6.16.

JIRA LINQPJ14-60

Change-Id: I7f622b5d046a92da2ade755e6a697c1810f61275
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3383387
(cherry picked from commit 320ec84efd492c0c2711c69104fabc30b4f15ecb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461850
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-10-01 15:27:42 -07:00
Jon Hunter
a59a10dfeb drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Mallikarjun Kasoju
14d6946415 watchdog: Fix overflow error
Fixed unsigned int overflow error.

Bug 5083375

Change-Id: If8ddb802938e9ef811462a99023830e3370a00ab
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296593
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Kartik
0bfc29c691 watchdog: Add support for Tegra264
Tegra264 use a different base address than Tegra234.

Update the logic of parsing Base Timer and WDT index from iomem resource
beginning.

Bug 4729969

Change-Id: I68d4f03373d2d648c1cf3b82bf74972361693bb5
Signed-off-by: Kartik <kkartik@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Shubhi Garg
84302c4c14 watchdog: max77851: add max77851 watchdog driver
Bug 200749982

Change-Id: I29d5fec53b576cabce2c5dab975cc81ccf4a4e57
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2595388
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2960844
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:26:07 -07:00
Kartik
966af3a139 watchdog: tegra: Add virtualization support
Tegra TKE WDT can be used from a Guest OS to check if the system is
responsive. In case of system hang/crash the WDT should report an
error event to HSM.

Add device tree property "nvidia,wdt-error-threshold" to configure
expiry level for HSM event trigger.

This patch also includes following bug fixes:
 - fix an issue in which WDT keeps running after system shutdown even
   if it is disabled from device tree.
 - fix an issue where the driver keeps patting WDT even if
   enable-on-init is disabled.

Bug 4080471

Change-Id: I8e660e68edbb7c97fa8fb2fdd7fafa8bf2a87884
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2903911
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit ff027900b83e985e50c78adf2b898ad078d5b60a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897226
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-22 19:14:42 -07:00
Laxman Dewangan
80ef5179fe watchdog: Add NVIDIA Tegra watchdog timer driver
Add NVIDIA Tegra watchdog timer driver.

Bug 3583627

Change-Id: Iaa4c54c990eac7e74adfce342f22df413349f863
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2702335
GVS: Gerrit_Virtual_Submit
2022-04-25 22:44:58 -07:00
Laxman Dewangan
21fb8a4e3a watchdog: Add software based watchdog timer
Add software based watchdog timer.

Change-Id: I923b1ea608d25105c5ad43bb561343cc2e403f3b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2674177
2022-02-28 04:27:34 -08:00