Commit Graph

18 Commits

Author SHA1 Message Date
Jon Hunter
ff48ee63b1 drivers: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.

Bug 4991705

Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Praveen James
2d1629804e fsicom: update hsp mb assignment to fsi core
Hsp mb for fsicom notifications are
assigned to configured fsi notification
core in sequence.

Bug 4825460
Jira FSIS-565

Change-Id: I9365f7c8c6459ad749f6fbf0a0dd9775b4225822
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204135
(cherry picked from commit b0b1e5cbbf888a558aedd563d81057301ee4ac8a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206769
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kovid Kumar <kovidk@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217463
2025-07-24 10:19:10 +00:00
Praveen James
55847ce7a0 fsicom: Add support for fsi core2 and core3
fsicom driver updated to support fsicom
channels without notification. With notification
disabled channels fsicom can support all four
cores of FSI

Bug 4805453
DOS-SHR-10636

Change-Id: I6cf4dd36c1570505dbcf582499189bd974ed095f
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197598
(cherry picked from commit 1dbdf63d67b102908c845671d18ddf4d14ae498f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206768
Reviewed-by: Kovid Kumar <kovidk@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217458
2025-07-24 10:19:10 +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
pshaw
ca62042a01 fsicom: fix misra and cert-c issue
- fix misra nad cert issue for the multi core code change

Bug 3952896
Bug 3959323

Change-Id: Id3108a604aea71e4b2b75034a2852b3083ad8947
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2974001
Signed-off-by: pshaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2977128
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-11-02 18:07:24 -07:00
Jon Hunter
ce678a37b1 drivers: Add conftest test for class_create
In Linux v6.4, the module pointer argument is removed from the
class_create() function. Add a test to the conftest script that checks
if this argument for the class_create() function has been removed and
use the definition created by conftest to select which version of the
function is used.

Bug 4183168
Bug 4221847

Change-Id: I440e4b318001886cd0319bb3499ba33178475e8c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989020
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-05 17:54:05 -07:00
Jon Hunter
cdc64f43fa drivers: Drop version check for DMA BUF namespace
The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.

Bug 4119327

Change-Id: If8a5e90340f7a0582247cb91611d275ec1f4990e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979260
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-13 22:21:25 -07:00
Shardar Mohammed
4be2dd36bb nvidia-oot: remove module * from class_create()
Remove the module pointer from the class_create() based
on following change in core kernel

======
driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
=====

Bug 4276500

Change-Id: Ifa0a92a282151ce12dc4a48f4f4b5b9499d3fbd8
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976600
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-08 18:09:50 -07:00
pshaw
01ecacf7b4 fsicom: add fsicom multi core support
- smmu and hsp support added for fsicom multi core
  feature in fsicom kernel driver
- probe, suspend and resume will be called for smmu_inst
  0 only as it will have single dev node for comm.
- mailbox 2,5 and 1,4 is used for TX and RX comm. respectively
  with FSI

Jira SS-5744

Change-Id: I859d5945853195ba76996a8c36ca19efd9c4409f
Signed-off-by: pshaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952268
Reviewed-by: Praveen James <pjames@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-27 21:50:21 -07:00
Praveen James
38152fe335 tegra-fsicom: fix deinit notification to fsi driver
fix for sc7 failure with FSI disabled build.
Deinit notification is send if fsi is flashed with
production fw.

Bug 4082254

Change-Id: I195369d040df96727b1d7a626fb9e37453d48bbf
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2906587
Reviewed-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-22 00:50:19 -07:00
Praveen James
3d2b7e4ff8 tegra-fsicom: send state notificatication to fsi
tegra-fsicom driver updated to send
suspend and shutdown notification to fsi

Jira SS-4834
Bug 4053113

Change-Id: I0df978783894b1a2ddc64ff8255a796366e79daa
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2880270
Reviewed-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@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-04-13 12:18:08 -07:00
Praveen James
dbf323fcd0 fsicom: update hsp timeout value
- updated tx timeout for hsp to 5 ms

JIRA SS-4192
JIRA SS-4628
Bug 3855033

Change-Id: Idfa47ab5944f202854a9f6aa4e0ac606c531a682
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819745
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 18:18:25 -08:00
Prashant Kumar Shaw
d3d5025a1c fsicom: updated memory unmap
- add support to unmap the previously mapped memory
- updated the data structure to store the dma pointer in
  user space
- taking dma buf pointer from user space while unmapping

JIRA SS-4006
JIRA SS-4628
Bug 3855033

Change-Id: I8ca71d11076b64af33c32e6e30c7c056828fbf75
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Signed-off-by: Prashant Kumar Shaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819744
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 18:18:20 -08:00
Prashant Kumar Shaw
f6d27d0561 FSICOM: IOVA per client kernel changes
- IOCTL datatype and call added for sending IOVA,
  offset and channel id data to FSI

JIRA SS-3385
JIRA SS-4628
Bug 3855033

Change-Id: I1212913a7ede879108800a68eafbe8240211572b
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Signed-off-by: Prashant Kumar Shaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819743
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 18:18:16 -08:00
Rahul Bedarkar
6a69011d7c tegra-fsicom: Implement PM ops
Initiate handshake with FSI by sending signal to NvFsiCom daemon on
system resume.

JIRA SS-3761

This patch is integrated from kernel/nvidia to kernel/nvidia-oot
https://git-master.nvidia.com/r/c/linux-nvidia/+/2720391

JIRA SS-4628
Bug 3855033

Change-Id: I08221f94248c39998df856ae3e254e02b2803985
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819742
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 18:18:11 -08:00
Laxman Dewangan
a88a06c213 fsicom: Import dma buffer apis with namespace
fsicom driver uses the  dma buffer which were exported
as EXPORT_SYMBOL_GPL() till K5.15. From k5.16, it is exported
with namespace i.e. EXPORT_SYMBOL_NS_GPL(). This change
needs to import namespace in fsicom driver for K5.16 onwards.

Add support for this.

Change-Id: I11a2dbe871c36dd467041866dce51cc0936331c4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2719735
Reviewed-by: Rahul Bedarkar <rabedarkar@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-05-30 12:50:20 -07:00
Rahul Bedarkar
b41ef0cf5e drivers/platform/tegra: add tegra-fsicom driver
Add tegra-fsicom driver. It provides interface to communicate with
Functional Safety Island (FSI).

Bug 3583609

Change-Id: I0cc45de69ca73092e13ee17fec4abd3f9c9e0468
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2707054
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-05-05 15:38:03 -07:00