Commit Graph

11 Commits

Author SHA1 Message Date
Jon Hunter
ccdd799b54 misc: mods: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the MODS drivers as
necessary to fix this. Note that we can simply remove the mods_dmabuf
'remove' function because it does nothing.

Bug 4749580

Change-Id: I8ac05a7b713916b9aca1694ca828682808df3287
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
2025-07-24 10:19:09 +00:00
koenz
c7f7e97fec driver:misc:mods: Increase max mods SMMU devices to 128
- More tested IPs require alloc memory through SMMU

Bug 4467535

Signed-off-by: Koen Zhao <koenz@nvidia.com>

Change-Id: I59fb622b9cd026257b31386e3822dd9511e93a4f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3160528
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
Tested-by: Koen Zhao <koenz@nvidia.com>
2024-06-23 13:05:53 -07:00
koenz
77f9756fb4 driver:misc:mods: Increase max mods SMMU devices to 32
- More tested IPs require alloc memory through SMMU

Bug 4467535

Signed-off-by: Koen Zhao <koenz@nvidia.com>
Change-Id: I41ac88d01ecbe640082ba4c70607cb701ad4f3f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067676
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-06 09:26:05 -08:00
Jon Hunter
0899829704 misc: mods: Fix headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ifb484189524a3ec86aa252e71b4489f4dba5aacd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059458
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-25 09:11:16 -08:00
Chris Dragan
97835cded8 misc: mods: update copyright header
Bug 4165184

Change-Id: Id5d570cc4e5c3364d696271b1333e47e02e17b9e
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976924
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-11 14:06:17 -07:00
Chris Dragan
0ae09fcdd1 misc: mods: clean-up copyrights
It is unnecessary to spell out license text when we are using
SPDX license identifiers.

Change-Id: I902e18a413126f4dddb0cbb1fb5c0e0de385d2a1
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892356
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 02:51:21 -07:00
Chris Dragan
7a8a0731ae misc: mods: update from Perforce
Bug 3928853

Change-Id: I813a78c92deb516844d67940e34d3f0e5303e96b
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2840673
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Kuan Luo
126b6fc5c7 mods driver: smmu: support qpsi acpi node
Add qspi1 node NVDA1513 support

Kernel 4.9 doesn't support acpi_device_get_match_data function,
define MODS_HAS_ACPI_MATCH_DATA macro to only build this interface
from kernel 5.10

Bug 3883085

Change-Id: I0820a45f4f529b3bcd27f36e44c090890fa728d5
Signed-off-by: Kuan Luo <kluo@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824562
(cherry picked from commit 7dfd65ddb8f0d326dc5bcbd4e6e88df575c8d18c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2824595
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-03 13:27:53 +00:00
Chris Dragan
c7fe179f62 misc: mods: fix bugs and style issues
* Fixed __user and __iomem pointer types.
* Added __poll_t for poll() return type if possible.
* Fixed error return from poll().
* Fixed init/shutdown in mods_dma.
* Declared internal unit functions as static.
* Assign NULL to init pointers instead of 0.

Bug 3528414

Change-Id: If39a14a429e2cda5d58edb6ffd60fd13693371e6
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2688314
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
dongqiang
df0985a449 Update for Bpmp MRQ Call
Update Bpmp MRQ Call Api to use bpmp dtb node in mods dtb devices
Used by MODS PCIE Test for bpmp uphy api
JIRA: TM-586

Change-Id: I67b34979151fa57fd1707b2393237828f2c23cef
Signed-off-by: Carl Dong <carld@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2577098
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Danny Li <dali@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-03 13:27:52 +00:00
Dong Qiang
949b226f0e Smmu Support for MODS kernel module
Bug 200582229

This change will add smmu mapping/unmapping support for MODS
allocated memory buffer by using kernel smmu api dma_map_sg_attrs()
and dma_unmap_sg_attrs()
1. new IOCTL MODS_ESC_IOMMU_DMA_MAP_MEMORY and
MODS_ESC_IOMMU_DMA_UNMAP_MEMORY is added to do smmu mapping/unmapping
and get smmu mapped address for MODS allocated buffers;
2. a platform device and driver is added to match mods smmu sid in dtb,
the device is used to do smmu mapping/unampping; and mods smmu devices
are added in dtb to match with the driver with smmu config

Signed-off-by: Dong Qiang <carld@nvidia.com>
Change-Id: I47d4d1c43f14fc6b51f0c00cee127e1d51377f64
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2180897
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00