15 Commits

Author SHA1 Message Date
Manish Bhardwaj
a08c7112e7 ivc: fix ivc driver issue for noble kernel
Bug 4377196

Change-Id: I4acc2d4e419f0ee95be760910f27da592369875c
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026287
(cherry picked from commit 54e431bcc9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283409
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Paritosh Dixit <paritoshd@nvidia.com>
2025-01-15 06:08:50 -08:00
Laxman Dewangan
2fc926c8fe firmware: bpmp-tegra186-hv: Enable build for Linux 6.2
The build of bpmp-tegra186-hv was disabled due to change
in core kernel to move the Tegra BPMP IVC to IOSYS-MAP
framework by commit 4c1e0a97351a5e ("firmware: tegra:
bpmp: Use iosys-map helpers") in Linux 6.1.

Bug 4346767

Change-Id: I704ef454192613ade8e97f708e997fa74a186b7b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031778
(cherry picked from commit 1fc6fc17f2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038670
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-15 23:54:41 -08:00
Jon Hunter
7f53d7ba3e nvidia-oot: Add options to disable drivers
In Linux v6.2, the Tegra IVC driver was updated to support iosys-map and
this breaks building some of the out-of-tree drivers for Linux v6.2+
kernels. In Linux v6.3, the GPIO OF APIs were removed and this breaks
building some of the out-of-tree drivers that use these legacy APIs. For
now the broken drivers are not built for these corresponding kernels.

Instead of checking the kernel version in the Makefile for the
corresponding broken driver, move the kernel version checking to the
top-level Makefile and add CONFIG definitions that can be used the
various Makefiles.

This is also needed for working with 3rd party Linux kernels that may
have upstream backports and need to set these CONFIG variables for their
Linux kernel.

Bug 4221847

Change-Id: I35ee59bccdcdb1be56e4680c453279b421692c6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-13 15:46:10 -07:00
Jon Hunter
4e8ed5f7b7 firmware: tegra: Add support iosys-map support for IVC
Linux v6.2 update the Tegra IVC driver to use iosys-map and this broke
support for the IVC EXT driver. Update the IVC EXT driver to support
iosys-map if the kernel supports this version of the Tegra IVC driver.

Bug 4221847

Change-Id: I1f1ddb1cc4312cb2359373b53287c110831b473c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996208
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-13 15:45:59 -07:00
Manish Bhardwaj
f8f33d49cc bpmp: stop mounting bpmp debugfs on vdk
Bug 4199271

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I7c960fcf3d7a125280ff33064ba7cd6bd1d0fb6d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2974344
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-19 15:26:36 -07:00
Mark Mendez
1435b03c66 BPMP: reduce HV timeout to 30 sec
The current timeout of 10 minutes for the BPMP-HV IVC
is too long.  Reducing it to 30 sec

Bug 4180228

Change-Id: Ibfa86bee39c970d0bb3dbdf2b2b446fdb6ad9ef4
Signed-off-by: Mark Mendez <mmendez@nvidia.com>
(cherry picked from commit a775d866e9127b95b7adee8d3b4961bb6ee6ae89)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962685
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2023-08-24 09:11:47 -07:00
Bharat Nihalani
1f9587aca3 drivers: Fix build errors with DEBUGFS_FS disabled
When CONFIG_DEBUG_FS is disabled, build errors are seen in the
following 2 drivers:

1. bpmpfw - The build error was seen because bpmp-debugfs.c was
getting compiled even when CONFIG_DEBUG_FS was disabled.

2. ufs - The build error was seen due to a couple of reasons:
- Function debugfs_provision_init is defined in a file that is
protected with CONFIG_DEBUG_FS, but is called from another file
unconditionally.
- In ufs-tegra-common.c, there are calls to debugfs_* functions, but
inclusion of the standard header debugfs.h is protected under
CONFIG_DEBUG_FS.

Fix these issues with this change.

Bug 4164776

Change-Id: Iae6384fd2352e55aed2a0ea85e778be6c26a4d54
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2926891
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-28 08:27:28 -07:00
Manish Bhardwaj
326c944e83 bpmp: fix kernel warning in bpmp driver
Using this patch we are fixing below kernel warning
in debug build where we are using sleepable APIs
in atomic context.
[   0.771396] Hardware name: p3663-0001 (DT)
[    0.771397] Call trace:
[    0.771397]  dump_backtrace+0x0/0x210
[    0.771406]  show_stack+0x30/0x50
[    0.771407]  dump_stack_lvl+0x64/0x84
[    0.771413]  dump_stack+0x14/0x34
[    0.771415]  __might_resched+0x144/0x180
[    0.771421]  rt_spin_lock+0x38/0x80
[    0.771426]  tegra_bpmp_transfer_atomic+0x7c/0x270
[    0.771430]  tegra_bpmp_init_debugfs+0xa04/0xf60 [tegra_bpmp]
[    0.771437]  platform_probe+0x70/0x130

Bug 4078180

Change-Id: I18c3a5332c27eaa85f49b524b4b6b2c08f85c332
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892833
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@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-26 09:42:45 -07:00
Mikko Perttunen
c711393bdf UPSTREAM: firmware: tegra: bpmp: Fix error paths in debugfs
Some error paths in mrq_debug_read and bpmp_debug_show would overwrite
the return error code with a subsequent call to mrq_debug_close.

Change the code to only change the error code if there was no prior
error.

Bug 3980003

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I3b2ce03c19aed2f6c692f69f68d8ce18c3e6c53a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2871549
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-17 04:18:20 -07:00
Thierry Reding
b2f8da0be3 UPSTREAM: firmware: tegra: bpmp: Prefer u32 over uint32_t
The canonical type for 32-bit unsigned integers in the kernel is u32, so
use that instead of uint32_t.

Bug 3980003

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I2a23f1cd0c70a93ffee1c179ee34bdf24c281e5f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2871548
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-17 04:18:15 -07:00
Jon Hunter
4a7bb89d97 firmware: tegra: Disable virtual BPMP driver for Linux v6.2+
Upstream Linux commit 4c1e0a97351a ("firmware: tegra: bpmp: Use
iosys-map helpers") updated the Tegra IVC driver to use the
iosys-map helpers for Linux v6.2. This causes the virtual BPMP driver
build to fail. Temporarily disable the building of this driver while
this build issue is fixed.

Bug 3936429
Bug 3974855

Change-Id: I1ae8800f1a44824c185960cee9dbf72c34b659c4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2861310
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-28 01:58:35 -08:00
Jon Hunter
b04b8c841c firmware: tegra: Disable IVC_EXT driver for Linux v6.2+
Upstream Linux commit 4c1e0a97351a ("firmware: tegra: bpmp: Use
iosys-map helpers") updated the Tegra IVC driver to use the
iosys-map helpers for Linux v6.2. This causes the Tegra IVC extended
driver build to fail. Temporarily disable the building of this driver
while this build issue is fixed. Stub functions are added to permit
other drivers that use this driver to build.

Bug 3936429
Bug 3974855

Change-Id: I300ed321afdd805838b51144fe98ba76b922493b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2861309
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-28 01:58:31 -08:00
Manish Bhardwaj
1c7751c581 bpmp: add support for virtual bpmp driver
Using this patch we are adding support for
virtualised bpmp driver in nvidia-oot.

JIRA ESLC-6885

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Ia863055082f64dfcafdbba114816c56af2e7f640
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2781331
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 11:09:33 -07:00
Timo Alho
b01a848777 [tegra-bpmp] create (partial) downstream fork of tegra-bpmp driver
Make a downstream fork of clock, reset, powergate, and debugfs parts
of tegra-bpmp driver by copying the respective files from mainline
Linux 5.19.11 (commit fcf22aefe87101424563a8dd8adec8a75b8c7576).

JIRA ESLC-6885

Signed-off-by: Timo Alho <talho@nvidia.com>
Change-Id: Ieae8e9f27325d84faf8adc5e8834ffe42ba5e696
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2782102
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 11:09:29 -07:00
Manish Bhardwaj
8c66804775 nvidia-oot: add support for extended IVC driver
Using this patch we are doing below activities:-
1. Use as much as possible source code possible from
   upstream driver.
2. If there is static function that needs to be exported
   to downstream driver then make a local copy of that.
3. add support for extended ivc driver since upstream
   driver does not have support for all required APIs.

Bug 3595577
JIRA ESLC-6884

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Id6c70525e378a80d9059f49f879909c88c55cb4f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2764453
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-26 16:04:36 -07:00