Commit Graph

330 Commits

Author SHA1 Message Date
Pekka Pessi
8531a63fc6 rtcpu: fix overflow in device tree code
Check the device tree property size for overflows. Refactor code
and remove extra pointer arithmetics.

CID 491822

Bug 3745813

Change-Id: I2cc6d448ceea1e287da47577e249dcd27240e6a6
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2844421
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-17 10:56:06 -08:00
Matti Ryttylainen
af0a39164b tegra: camera: Remove dead code from rtcpu drivers
Remove BWMGR code that is not used in K5.15 from tegra-camera-rtcpu and
debug drivers

Jira CAMERASW-10218

Change-Id: I7ab83a92ba200c5f7bfcd3d121a5a3c94751bd9c
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2821839
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-01-12 01:15:43 -08:00
Pekka Pessi
56a13937ba tegra: rtcpu: use runtime pm in SC7 resume
Keep runtime PM in sync with RCE runtime status during SC7 resume.

Bug 3909663

Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Change-Id: I4622fd104f2c1d039f2ef07ebbfeb6164098ffb8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2839974
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-11 11:23:04 -08:00
Pekka Pessi
7a84b1a978 tegra: rtcpu: log PM transitions
Log power management transitions at debug level.

Bug 3909663

Change-Id: Ib15dfdd6f3a45dba048b2315201daa04fcd7ec54
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2839973
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-11 11:23:00 -08:00
Ketan Patil
ca3bbfe355 platform: tegra: Remove bad driver
Enabling CONFIG_FORTIFY_SOURCE is resulting into following compilation
issue:
- error: detected write beyond size of object passed as 1st parameter

As this driver is not needed anymore, remove it. This driver is already
removed from linux-nvidia repo as part of the following change:
https://git-master.nvidia.com/r/c/linux-nvidia/+/2772009

Bug 3870276

Change-Id: If783117ea50bf0415df511faba7bf672978f802a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2833347
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-26 10:47:49 -08:00
Jon Hunter
46858f60e8 mc-utils: Move driver into sub-directory
The mc-utils driver shares a Makefile with several others drivers in the
drivers/platform/tegra directory and this means that we cannot compile
the mc-utils driver independently of these other drivers and package the
mc-utils driver without all of the other drivers. Therefore, move the
mc-utils driver into its own sub-directory and add its own Makefile so
that we can build and package this driver independently.

Bug 3841177

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: If8962fc1ede9fb4318341a7961106f799156cdad
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2827672
(cherry picked from commit a18d0a5a739144dc00a7200ec53397966fc543ba)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2829120
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-21 06:25:16 -08:00
Jon Hunter
dc420b6a6d video: camera: Fix rtcpu build for Linux v5.14
The RTCPU driver fails to build with Linux v5.14 as an out-of-tree
module because the return type of the bus_type remove callback is int
and not void. Make the necessary changes to allow the RTCPU driver to
build for Linux v5.14+ kernels.

Bug 3820317

Change-Id: I127d9ff2ae12901f85374e3e8feabc77e0d17407
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2820711
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-05 20:45:44 -08: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
Matti Ryttylainen
dd109353df video: camera: Modify rtcpu modules for OOT tree
This patch modifies rtcpu modules to use new ivc headers,
resolves cyclic dependencies between the modules,
reduces the amount of modules built by linking them together
and fixes other minor issues encountered with K5.15

Change-Id: I9cf2672df08ffe6c4b8aea9ac21d6cc50a92bb4e
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2787121
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 11:00:42 -08:00
Frank Chen
304123a3bf video: camera: Port RTCPU drivers to OOT tree
Port RTCPU drivers from kernel/nvidia to kernel/nvidia-oot.
In addition to copying the files this patch:
1) Modifies make files to build rtcpu drivers as modules
2) Modifies licenses of all ported files to SPDX
3) Adds MODULE_LICENSE macro to all modules
4) Removes checks for old kernel versions and the dead code after those checks
5) Fixes style errors according to checkpatch.pl

Change-Id: If64296a22ce958e5326c7509cb69f8f7154f598e
Signed-off-by: Frank Chen <frankc@nvidia.com>
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2783040
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-01 11:00:35 -08:00
Ashish Mhetre
25074f2a0c platform: tegra: Add OOT driver for MC utilities
Add mc-utils OOT module which is used by clients to get information
regarding MC and EMC parameters.

Bug 3826001

Change-Id: Ic03405bd1f6f6ba4bb11082c0e94c67e99cfbb6d
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2805684
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-11-10 07:07:07 -08:00
Rahul Bedarkar
1f45d1e993 Remove tegra-epl driver
tegra-epl driver is added in kernel-oot repo so that i2c, pcie and
other upstream drivers can use interface to report errors.

Bug 3847981

Change-Id: I9dfe5cd92eb9955a35753ce14a12dc4799258b70
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2799410
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-02 12:17:10 -07:00
Mahesh Kumar
c0df447edb DCE FW: Add dce kmd module
This patch includes DCE-KMD module as part of OOT kernel.

Bug 3583600

Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Change-Id: I665af488f6de07cfb7d3f44ff218b0fb75063acb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780391
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-18 05:16:49 -07:00
Puneet Saxena
aa0b664723 drivers: tegra: make mc-hwpm module oot
Make mc-hwpm module oot. Below are the reasons why
making a fresh copy in nvdia-oot folder -
- hwpm is introduced from T234 onwards
- mc-hwpm is dependent on mc driver. nvidia-oot
uses upstream mc driver. Hence mc-hwpm should also
use upstream mc driver.
- Thats why porting changes needed in mc-hwpm driver
to be incompatible with upstream mc driver

Bug 3728991

Change-Id: I2d7347d968895e080fa79d100b4c50c094ced1e3
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2781118
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-06 17:21:03 -07:00
Manish Bhardwaj
a2fdb986b0 nvidia-oot: add nvpps and ptp driver
Using this patch we are adding support for
ptp and nvpps driver in oot kernel.

JIRA ESLC-6885

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: Id47ac5602d11ce417f9d421b4f672578922ca94f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2785318
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: David Tao <tehyut@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-03 21:31:01 -07:00
Eric Funsten
564dadea31 platform/tegra: Add in uncore_pmu module for oot
Ports over tegra23x_perf_uncore and mce modules for OOT.

Bug 3583633

Change-Id: I59999db51a7ef6b47f2e9929f28505fc78844825
Signed-off-by: Eric Funsten <efunsten@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2763940
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-29 19:38:17 -07:00
Sanjay Chandrashekara
d61f30d568 t23x: ari: build mce ari driver as a module
Bug 3680143

Change-Id: I1092b85239222b6af9a9ecfc536801f298706e60
Signed-off-by: Sanjay Chandrashekara <sanjayc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774586
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-21 01:11:14 -07:00
Vedashree Vidwans
460fb0fd97 nvidia: oot: add HWPM driver build support
BaseOS with OOT kernel drivers is a requirement going forward. Copy
required HWPM source files to nvidia-oot folder.

Jira THWPM-41
Bug 3583624

Change-Id: I4e4fbcad59ae3f01278b2f92816cbe8903fd0cc7
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2763352
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-16 07:51:59 -07: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
Laxman Dewangan
5197b374cb cvnas: Copy source file from kernel/nvidia to build cvnas module
Copy the sources of cvnas module from kernel/nvidia to
kernel/nvidia-oot to build cvnas as OOT module.

Files get copied at build time.

Bug 3583599

Change-Id: Ib0e4599872230dfc9fb0dc25c383d3da6ee74ecb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2715736
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-05-25 05:01:38 -07:00
Rahul Bedarkar
6f854558c1 drivers/platform/tegra: Add tegra-epl driver
Add tegra-epl driver. It is used to report software detected errors via
HSP mailbox or MISC-EC registers to safety service module running on
the Functional Safety Island (FSI)

Bug 3583609

Change-Id: I5bd3e4bd261d00a353743b01c83ed8df6f00e90a
Signed-off-by: Rahul Bedarkar <rabedarkar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2710277
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-05-13 14:56:18 -07:00
Laxman Dewangan
a01851131c tegra/platform: Add driver for firmware class and inventory
Add driver for common utility API for firmware class and
dumping the inventory for all firmware.

Bug 3583607

Change-Id: I259bc7f80b8842cea090f67b067f63e5f85cb79c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2708890
GVS: Gerrit_Virtual_Submit
2022-05-07 15:21:39 -07:00
Laxman Dewangan
7c00563944 platform/tegra: Add bootloader debug driver
Add bootloader debug driver which provides debug functionality
from user space.

bug 3583607

Change-Id: I8bdd2712e755b370b3e157bcdcd3329122729fea
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2708549
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-05-06 05:22:34 -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
Laxman Dewangan
e37c28218e platform/tegra: Add common central actmon implementation
Add central actmon common functionality for actomon
driver implementation instead of dummy implementation.

Bug 3583573

Change-Id: Iff1512e62fc01431899515c78717d5afdae8d910
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2705646
GVS: Gerrit_Virtual_Submit
2022-05-01 12:43:29 -07:00
Laxman Dewangan
527743a5c3 platform/tegra: Add Tegra Central Activity Monitor driver
Actmon is a hardware block that can be used to track the activity of
certain hardware units. It can boost EMC clock depending
on the memory traffic among various client. It is called central actmon
as it monitors central activity for example MC activity.

Add central activity monitor driver.

Bug 3625675

Change-Id: I1a5918e7d84bc247f694f53f965c28888b773c91
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2705395
GVS: Gerrit_Virtual_Submit
2022-05-01 09:26:33 -07:00
Laxman Dewangan
d75309658f platform/tegra: Add bad driver for memory access check
Add bad driver which check the memory access more than
allocated size.

Bug 3625675

Change-Id: Iad248a00f3c0f6b71ea060a9e5475123cd893bc2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2705394
GVS: Gerrit_Virtual_Submit
2022-05-01 09:26:28 -07:00