Below changes are made to support future
extensibility for new chips:
- Chip data field 'adsp_prid' is added to specify DSP ID
- Chip data field 'adsp_elf' is added to specify ELF file name
- DT property "nvidia,cluster_mem" is added to specify cluster
internal memories; ELF segments will be loaded into these
using intermediate shadow buffers so that unaligned access
is avoided
- "nvidia,adsp_mem" entries are made optional (0x0 in the size
field will indicate bypass)
- Chip extension functions 'set_boot_vec' and 'set_boot_freqs'
are added to support chip specific settings
Bug 4164138
Bug 3682950
Change-Id: I538ae0df57fa199a6eef75441167a9a5ba6924e8
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2894321
(cherry picked from commit fa7fc9d08af5fab9d0b2c5eb1b9b9a78446ade0e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971980
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
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>
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>
- 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>
In Android's user-build, debugfs is not configured. This has led to
multiple warning errors related to Debugfs usage in the nvidia-oot
build. Add CONFIG_DEBUG_FS conditional compilation around the
functions that use it.
drivers/scsi/ufs/ufs-tegra-common.c:39:13: error: unused function
'ufs_tegra_init_debugfs' [-Werror,-Wunused-function]
static void ufs_tegra_init_debugfs(struct ufs_hba *hba)
^
1 error generated.
drivers/platform/tegra/aon/tegra-aon-debug.c:732:13:
error: unused function 'tegra_aondbg_recv_msg'
[-Werror,-Wunused-function]
static void tegra_aondbg_recv_msg(struct mbox_client *cl, void *rx_msg)
^
drivers/platform/tegra/aon/tegra-aon-debug.c:749:12:
error: unused function 'aon_dbg_init' [-Werror,-Wunused-function]
static int aon_dbg_init(struct tegra_aondbg *aon)
^
2 errors generated.
Bug 4230728
Change-Id: I4210c3574b4d76205fdca45990e9ccc02c18620a
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2964635
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Simplify the MC-HWPM driver and fix the hang seen during probe of it.
These changes are made to scale the driver for future SOCs as well.
The hang is seen because MC registers are accessed in function
get_platform_dram_num_channels() before the MC aperture is io-mapped.
Bug 4235766
Change-Id: I3c8f9229898ac459c616aca0ef400a8b4c16e66a
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2963195
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Building the Tegra RTCPU driver generates the following warning ...
drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:
In function ‘rtcpu_trace_exceptions’:
drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c:331:1:
error: the frame size of 1424 bytes is larger than 1024 bytes
[-Werror=frame-larger-than=]
331 | }
| ^
Allow the frame size to be 2048 bytes to resolve the warning while a
proper fix is implemented.
Bug 4190165
Change-Id: Id684711f036fce759d7a328ad7d63f754a9b46e0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938377
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Once we complete EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED event handling, it
doesn't reset the complition variable. Which causes
dce_wait_interruptible to exit early without waiting in next cycle.
This patch fixes the same by resetting complition variable after use for
EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED.
Bug 4167219
Change-Id: Id9b9047fa0e293f8616e23a5c8b4b1bacf233934
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927740
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Remove unused module drivers from build as the drivers
are integrated with client driver as single module.
Drivers which are getting removed are:
clk-group
device-group
reset-group
These drivers was restored due to packaging error in
release branch which is fixed now.
Change-Id: I094e62ae2a83eb7816c98bf113c5a74f2636a41f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929127
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Add the following driver back into build to avoid
the packaging error in release branch to avoid
package error:
clk-group
device-group
reset-group
These drivers will be deleted after release branch is updated
with proper packaging.
Change-Id: I128a3fee5d0fb19c78321845b06deb023f233a59
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2926512
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
When kernel command line debugfs=off is specified instead of
disabling CONFIG_DEBUG_FS in defconfig to disable Debug-FS,
debugfs functions like debugfs_create_dir will fail.
Use function debugfs_initialized() to check if debugfs
functionality is enabled before calling any debugfs functions.
This allows us to by-pass debugfs initialization if debugfs
is not enabled.
Also, there is no need to protect debugfs related code under
CONFIG_DEBUG_FS, as stub functions for all debugfs APIs are
defined when CONFIG_DEBUG_FS is disabled.
Bug 3752450
Change-Id: I1aa2c46bc822da54fdc87504ac75c91845e02c12
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2820666
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Support is added for launching multiple FW on ADSP (multiple
AMP, or combination of SMP and AMP). CONFIG_TEGRA_ADSP_MULTIPLE_FW
will need to be enabled.
Shared memory is communicated via the respective AHSP for the core.
For front door boot MB2 would have loaded the FW for all the cores.
Carveout allocation should be set as necessary (4x4 MB = 16 MB).
Backdoor boot via SMMU is also supported. Individual core FW for
AMP cores are loaded first, followed by core-0 FW at the end.
CCPLEX<->ADSP communication is limited to AHSP0, so only core-0
(SMP or AMP) will be accessible for command interface or signalling.
Bug 200745833
Change-Id: Ibfddd463de1ecada6fd47944ca12ef0444cd269f
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2722603
(cherry picked from commit 1e08636df25690017b8d7e1818eda210fef6da8b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2701452
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
There is a decompress_done flag in the adsp OS firmware
that was earlier used to indicate that decompress is done
at the adsp os cold boot
However this flag cannot be part of firmware
as fw needs to authenticated at the sc7 resume as well and
hence the fw should not have modifications
On fw side, the flag is removed. Instead the same information
is preserved across sc7 cycles via HWMBOX5 and this driver
enables the decompress bit to indicate the same to adsp at
cold start
Bug 3491011
Change-Id: I77d1ff6defdf1228f4cd4278cf5bb667df51fad1
Signed-off-by: Uday Gupta <udayg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2660706
Tested-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
It may be useful at times to boot ADSP via backdoor, even
while system boots via front door. MB2 sets the ACAST in
front door, so ACAST setting from nvadsp driver is skipped
if that region is already enabled.
Above scheme will work for ADSP backdoor boot via SMMU
mapped memory, but not for physical memory, as the underlying
carveout memory is different between frontdoor and backdoor.
Bug 200745826
Change-Id: I718da97e3f06eb86b3e40efab91275f2d5958dd4
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675786
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit