Shubhi Garg
e4ded64e88
oot: fix mutex unlocking in vrs rtc
...
Kernel throws a dump trace upon setting wakealarm time on VRS RTC.
We are unlocking mutex twice in a single API call. Delete one instance
which is not required.
[ 590.301592] Call trace:
[ 590.304035] __mutex_unlock_slowpath.isra.0+0x1d4/0x2d0
[ 590.309274] mutex_unlock+0x60/0x80
[ 590.312766] 0xffff80007ce0e6ec
[ 590.315909] __rtc_set_alarm+0x100/0x200
[ 590.319751] rtc_timer_enqueue+0x168/0x2e8
[ 590.331275] dev_attr_store+0x20/0x601e8
[ 590.335117] sysfs_kf_write+0x4c/0x88
[ 590.338609] kernfs_fop_write_iter+0x144/0x1d8
[ 590.343149] vfs_write+0x254/0x398
[ 590.353626] invoke_syscall+0x50/0x14040
[ 590.357468] el0_svc_common.constprop.0+0x48/0x100
[ 590.362357] do_el0_svc+0x24/0x40
[ 590.365501] el0_svc+0x34/0xc8
[ 590.372835] el0t_64_sync+0x194/0x19830/0x140
[ 590.376679] ---[ end trace 0000000000000000 ]---
Bug 4715238
Change-Id: I7e070772c81474eb22859f2a00934211e6dad834
Signed-off-by: Shubhi Garg <shgarg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3502098
2025-12-01 05:38:59 -08:00
Jon Hunter
74c0a6d16d
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
(cherry picked from commit 2c3a31c9b72785ee35ad079422b624f59a35f622)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276870
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-01-06 06:09:10 -08:00
Jon Hunter
15ca4ff659
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
(cherry picked from commit 951b2423a8 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210788
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-09-11 04:39:43 -07:00
Shubhi Garg
b02f2cd5ee
rtc: update VRS RTC IRQ to system hwclock
...
Update RTC IRQ occurred to system hwclock by adding
rtc_update_irq in irq handler.
Bug 3740696
Change-Id: I1ad9c05f759b5b11f8f212eb91a709f1b3625336
Signed-off-by: Shubhi Garg <shgarg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2764942
(cherry picked from commit 1926f478143bb1962da8748b6cbc9c094c37a7a4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999458
(cherry picked from commit 608ed39528a9735ad229067c8f9c6853d9a33a6e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026474
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
2023-12-04 04:24:18 -08:00
Jon Hunter
48061dcb5d
rtc: Remove DT check for VRS RTC
...
The VRS RTC driver does not required device-tree because the device is
populated by the parent NVIDIA VRS PSEQ driver. Therefore, remove the
device-tree check in the probe function of the VRS RTC driver so that it
is not necessary to populate the device-tree node for the RTC device.
Bug 4006278
Change-Id: I0c5ca81a65109b3f0d5e12465a5496e558c9887c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867042
(cherry picked from commit de193f1eec7497164b73b922deddaf216457592c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2870757
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-21 02:35:48 -07:00
Jon Hunter
6fb4e1b127
rtc: Fix automatic loading of VRS RTC driver
...
The NVIDIA VRS RTC driver is not automatically loaded when built as an
out-of-tree module. Populate the MODULE_DEVICE_TABLE to fix this.
Bug 4006278
Change-Id: I651a6ab4a6aba6666532aed19146d9772c1c77ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866611
(cherry picked from commit 4867aa729b46a262d50a03487b1869a5e3703be7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866850
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-03-13 04:58:37 -07:00
Shubhi Garg
1fa3407928
rtc: fix coverity defects
...
CID 10166554: Unintentional integer overflow defect.
Fixes by typecasting ret of signed 32bit value to signed
64bit value.
Bug 3952896
Change-Id: I35cbc8bf3e9eb906688f9bb27953d1e5bf76633d
Signed-off-by: Shubhi Garg <shgarg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2864836
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-11 19:15:24 -08:00
Shubhi Garg
2f9478c1eb
rtc: add VRS10 PSEQ RTC driver
...
Adding RTC driver support for Nvidia based Voltage Regulator Power
Sequencer. Driver depends on CONFIG_MFD_NVVRS_PSEQ to get enabled which
is a parent driver for RTC. Following are the VRS RTC functionalies:
1. RTC executes alarm function to wake system from suspend/shutdown state.
2. RTC has 32bit time counter register which increments each second.
3. RTC triggers interrupt when the set alarm time becomes equal to the time
read from TIME registers.
Bug 200669555
Change-Id: I7890c084e5a1ec075823fee3ae5171fe7a89c6e0
Signed-off-by: Shubhi Garg <shgarg@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2748752
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-07-29 00:09:21 -07:00