Commit Graph

130 Commits

Author SHA1 Message Date
Jon Hunter
4b2fd8250d tegra: hwpm: Use conftest for 'struct class' changes
In Linux v6.2, the 'struct class.devnode()' function was updated to take
a 'const struct device *' instead of a 'struct device *'. A test has
been added to the conftest script to check for this and so instead of
relying on kernel version, use the definition generated by conftest to
select the appropriate function to use.

This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.

Bug 4119327

Change-Id: I751b7401adee7b337192e255253b974cbd803642
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2991966
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
jetson_36.2 rel-36_eng_2023-11-07
2023-10-10 11:54:25 -07:00
Jon Hunter
971645b49c tegra: hwpm: Add compilation flag for iosys-map.h
Determining whether the header file iosys-map.h is present in the kernel
is currently determine by kernel version. However, for Linux v5.15,
iosys-map.h has been backported in order to support simple-framebuffer
for early display. Therefore, we cannot rely on the kernel version to
indicate whether iosys-map is present. This is also true for 3rd party
Linux kernels that backport changes as well. Fix this by adding a
compile time flag, that will be set accordingly by the conftest script
if this header is present.

Bug 4119327
Bug 4228080

Change-Id: I9de07a4615a6c9da504b36750c48e73e200da301
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2974080
(cherry picked from commit 54ce334474)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2946966
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
rel-36_eng_2023-10-04
2023-09-19 06:54:29 -07:00
Vedashree Vidwans
d69752c349 tegra: hwpm: enable video unit profiling
Enable HWPM profiling for VIC, OFA and NVENC video units in external
builds.

Bug 4158291

Change-Id: I09589bbd70de2f1061dc91926f689266f36d062c
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2914401
(cherry picked from commit f8c37a91ff73c951426a679c1b87684c2e38b916)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2928956
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2023-07-06 14:56:59 -07:00
Vedashree Vidwans
6b78463b8a tegra: hwpm: include all ip files
The config flags defined in Kconfig file are not available/used with
OOT kernel builds. To support all kernel versions, HWPM compiles
independent of CONFIG_TEGRA_SOC_HWPM flag. This also applies to
IP config flags which are not supported as well. Hence,
include HWPM IP files irrespective of the IP config flag status.

For OOT builds, use tegra_is_hypervisor_mode() instead of using
static function defined in HWPM driver.

Bug 4061775

Change-Id: Ifab4ad5c7c652a4ad17820a82b363e92280fdd1a
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2918870
(cherry picked from commit 91d75567c0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2928930
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2023-07-06 14:56:54 -07:00
vasukis
c0fd0eff25 tegra: hwpm: Remove force enabling of MSS_GPU HUB
MSS GPU HUB has been force_enabled in T234. This is
not necessary, hence removing it.

Bug 4061775

Change-Id: Ief949ac65ab239110ea6c532e907a663951f454c
Signed-off-by: vasukis <vasukis@nvidia.com>
(cherry picked from commit b0277a8667114a179b9c6140c71f16a265c4f69b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2918737
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
2023-06-10 19:47:20 -07:00
vasukis
c2ca6a1d6f tegra: hwpm: Add dev_name details for NVDLA
- NVDLA exposes a debug node for HWPM on QNX to send
Read/Write register Operation requests. This can be
accessed via the 'dev_name' property.
- Set fd to 1, to indicate that NVDLA has debug node
enabled.

Bug 3945000

Change-Id: I8a4859fbafa204c8f8e18292fbd224c4897a85be
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2908524
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-24 09:00:33 -07:00
vasukis
26bd5451c2 tegra: hwpm: Modify OS common code for HWPM resmgr
- Modify the OS common code to be used by HWPM resource
manager in QNX.
- Add dev_name and fd fields in IP files
- Typecast variables to unsigned long long where ever they
are printed with %llx.

Jira THWPM-54

Change-Id: Ie3696f5dab03dddf30ae6939525ef8f999260d5d
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2901186
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-16 06:25:06 -07:00
Jon Hunter
afce55ed44 tegra: hwpm: Fix build for Linux v5.14
Building HWPM with Linux v5.14 currently fails because the arguments
passed to the dma_buf_vmap and dma_buf_vunmap functions is incorrect.
The arguments passed to the dma_buf_vmap and dma_buf_vunmap functions
were actually updated in Linux kernel version v5.11 and not v5.15. So
correct the kernel version in the HWPM driver so that the correct
version of the APIs are used for Linux kernels v5.11+.

Finally, drop the kernel version check around the inclusion of module.h
and the import of the module namespace because this is not necessary.

Bug 3918909

Change-Id: I98eef5c69af058abfd5ac925614954404371175c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2860794
(cherry picked from commit 72f00b64c3871e69e7242516849a76bde106ae17)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2888555
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-05-04 11:41:29 -07:00
Vedashree Vidwans
9a9f2f3635 tegra: hwpm: read MC config fuse
On production board, MC config details are available through fuses. Add
function to read MC config fuse. Use the floorsweep fuse info to find
available elements.

Bug 3936487

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I9e1549e3dfb9c06d8013ca2e1d43eb21bf0289f4
(cherry picked from commit f38e98a94ab8d478af3ebe1c922da606df9b67dc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2888554
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-04 03:12:59 -07:00
Vedashree Vidwans
4ecc672c3e tegra: hwpm: clean up code and add bug fixes
- Create tegra_hwpm_element_enable() instead of directly using
perfmon_enable() HAL. This will allow us to expand
tegra_hwpm_element_enable in future.
- Update log messages in ip structure init code and floorsweep info
function.
- It is possible that IP instances and elements to have 0 start range
address. So, modify check for available elements to use range end
instead.
- Use tegra_hwpm_fake_readl() and tegra_hwpm_fake_writel() macros
instead of fake_readl() and fake_write() functions. That way we have
similar implementation of IO functions and macros can be used across
OSes.
- Check that reserve perfmon function is invoked only for HWPM
components. This check will be useful for expansion in types of
components in the future.
- Clean up and rearrange tegra_hwpm_regops_readl_impl() and
tegra_hwpm_regops_writel_impl() to have designated code corresponding to
the element type.
- Currently, device open and release functions are incorrectly using
clock enable/disable functions instead of using HALs. Correct open and
close functions to use lock HALs.
- Currently, tegra_hwpm_update_mem_bytes() doesn't validate mem_mgmt
structure allocation before accessing mem_bytes_kernel pointer. This can
lead to kernel crash. Update tegra_hwpm_update_mem_bytes() to return
error if mem_mgmt structure s not allocated.

Jira THWPM-74

Change-Id: Ia40bd51187e5ea08572dbee81e577dacf5fb66b6
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit 411f07484d68dfde0d350a5c67f2748e876b11b8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2888553
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-04 03:12:54 -07:00
Vedashree Vidwans
5c6e6f4797 tegra: hwpm: fix sparse warnings
Fix sparse warnings for OOT kernel.

Bug 3954363

Change-Id: Ia25a0be9e204d07a3618978b970c9d997838982e
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit 6b6ff86998e0f31facf5aa3503a90f3d40dd562c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2888552
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-04 03:12:50 -07:00
Vedashree Vidwans
5b8bb57dcb hwpm: Makefile: Add support to make as module
Add support to make the HWPM driver as module.
Set appropriate path and environment variable
which needs to be passed when building the driver
as module.
Use basic fuse.h file instead of using fuse-helper.h which is not
available in OOT builds.
Introduce HWPM mock file to add definitions for register and
unregister used if HWPM is not compiled in a build.

Bug 4088571

Change-Id: Id6cfb78356d752b963ad7eb16e39b85df92a9a4b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2894547
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 02:19:06 -07:00
vasukis
ea6b4bcc07 tegra: hwpm: Modify OS common code for HWPM RM
Modify the OS common code to be used by HWPM resource
manager on QNX.

Jira THWPM-54

Change-Id: I5e0e8258eececea1526e50e2efe18c79765b86b0
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2870342
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Yogesh Solanke <ysolanke@nvidia.com>
Tested-by: Seema Khowala <seemaj@nvidia.com>
2023-03-17 04:02:24 -07:00
vasukis
b27a32e7f0 tegra: hwpm: Modify OS common code for QNX
Modify the OS common code to be used by HWPM QNX
resource manager.

JIRA THWPM-44

Change-Id: Ibade56d3d94ce4d7e014e199963e2ddf568e7d3a
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2858465
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Vivek Bangera <vbangera@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-08 06:20:00 -08:00
Vedashree Vidwans
8b861518c4 tegra: hwpm: update licenses for all files
Modify OS agnostic files in common, hal and include folder to use MIT
license. This will allow the files to be shared between different OSes.
Modify OS specific files in os/linux and uapi folders to add SPDX
identifier for GPLv2.

Jira THWPM-69

Change-Id: I4fef142354a46fc23b67616204ccf0712a99caec
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797453
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:24 -08:00
Vedashree Vidwans
e115e1da2f tegra: hwpm: update aperture mmio details
HWPM components (PMA, RTR, perfmon) have MMIO address space and a
corresponding virtual address region. It is possible that both MMIO and
virtual addresses are same for an aperture.
MMIO address of an aperture is used in device node to enable the
aperture and further to map HWPM component in the driver.
Virtual addresses are used by the applications to execute regops on HWPM
apertures. Virtual addresses are also used to fake aperture address
space in simulation.
This patch updates
- HWPM aperture structures to include MMIO address.
- aperture ioremap function to use MMIO address values.
- fake register allocation to use virtual address values.

Jira THWPM-41

Change-Id: I05acb68dcb278722cd333e1187b2355d1d739e93
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit 1c0e8107b4cddad7532c10dddc22bb30cef2540b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2853213
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:20 -08:00
vasukis
1bbda26d7d tegra: hwpm: Add C2C IP support
Add C2C enum in HWPM IP/Resource lists for internal and userspace
perusal. Update translate enum function accordingly.

Jira THWPM-72
Bug 3910198

Change-Id: I1b0ad91345bdf302b3f9b4b7e171bb3f4cc7b2b5
Signed-off-by: vasukis <vasukis@nvidia.com>
(cherry picked from commit 721aef448cf00878764f87dfc48241fb055c49b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2853212
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:15 -08:00
Vedashree Vidwans
dd4f96e5c9 tegra: hwpm: fix kernel crash on TOT
Currently on TOT, stream buffer map functions results in kernel crash.
The kernel crash is an effect of incorrect conditions in the mapping
function. Fix the code logic to use correct kernel version conditions to
use appropriate DMA buffer structures.

Bug 3893741

Change-Id: I3888ec01fdb2025f6d9c3a22296ca9d1abbcadb0
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit 5a3476cfb6574eb5ace29801a4f428ce9d694ce9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2853211
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:11 -08:00
Vedashree Vidwans
d782c9ee5b tegra: hwpm: fix sparse errors
Below listed functions are defined and used in the same source file,
hence update the functions to be static.
- tegra_hwpm_element_disable
- tegra_hwpm_element_reserve
- tegra_hwpm_element_release

Bug 3528414

Change-Id: Ib9aa44001fb5fac1e339b3264a4d750af09b9a01
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2847009
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2023-02-08 03:16:06 -08:00
Jon Hunter
5bd6255239 tegra: hwpm: Fix build for Linux v6.2
Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct
class.devnode() take a const *") updated the 'devnode' function pointer
under the class structure to take a const device struct. This breaks
building the Tegra HWPM driver with Linux v6.2. Make the necessary
changes to the HWPM driver to fix the build breakage.

Bug 3936429

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I54b7bcefbd5a2e6e88c13b3714ea012cc2a73615
(cherry picked from commit de9dd40f6a4dc35e6ee9e6140cac148171bcd6e1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2847008
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:02 -08:00
Vedashree Vidwans
f010cf5956 tegra: hwpm: update dma vmap for kernel > 5.10
Kernel version beyond 5.10 introduces dma_buf_map structure (called
iosys_map in later versions). Kernel virtual address corresponding to a
dma_buf is stored in the dma_buf_map structure.
- This patch updates memory management function to use correct mem bytes
buffer kernel virtual address stored in the corresponding dma_buf_map
structure.
- Use dma_buf_map structure pointer to unmap kernel virtual address.
- During release, poll mem bytes buffer with finite timeout value.
- Add description for use of dma_set_mask_and_coherent.

Bug 3893741

Change-Id: I42ace2fe70b36d7d5d1a4c5fee21786826f24a07
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit ce852be6b39ef39affccdee41ad436fc70bf86b5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2847007
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:15:58 -08:00
Vedashree Vidwans
7a89f70da6 tegra: hwpm: t234: decouple force IP, minimal cfg
- HWPM driver requires to know if an IP is available for performance
measurements. The ideal way is for IP driver registration with HWPM
driver. This way IP driver can share required power management and
register access function pointers.
- For IPs that do not have registration mechanism implemented, a
workaround to set an IP enabled is implemented in the HWPM driver.
- In the recent releases, MSS channel, PVA and DLA IPs are the only PORs
for production builds. Currently, this is acheived using the combination
of minimal build and force enable flags.
- However, this implementation limits the number of enabled IPs on TOT
to only minimal expected ones.
- This patch modifies the force enable IP logic implementation to make
force enable and minimal IP flag definition more clear.
- CONFIG_T234_HWPM_ALLOW_FORCE_ENABLE should be used to purposely enable
IPs that do not have registration mechanism implemented. This flag is
used for POR or non-POR IPs. Ideally, all IPs should implement HWPM
registration and force enable flag should not be required.
- CONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE should be used to implement logic
for POR IPs. In other words, if CONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE is
not defined, non-POR IPs should be included in the builds. This patch
sets MINIMAL IP config only for external non-safety builds.

- Fix include t234_perfmon_device_index.h error in t234_mss_mcf.c file.
- Add missing device index for PVA perfmon C0.

Jira THWPM-41

Change-Id: I20651eac14b6d42e5bf3cc5164d1f64ec208dc04
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2818735
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:15:53 -08:00
Vedashree Vidwans
b7d94cea88 tegra: hwpm: remove support-soc-tools dependency
Property support-soc-tools was added mainly to provide user's control to
enable/disable HWPM feature. Since, the same functionality can be
achieved using "status" in device node, support-soc-tools property is
redundant. Hence, this property is removed from HWPM device node.
Update HWPM driver probe to not depend on support-soc-tools property.

JIRA THWPM-48

Change-Id: Ieaa5c77e6c62a59e938832f886c5a82031139ac6
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797449
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2022-12-11 14:50:19 -08:00
vasukis
c7ea8476fc tegra: hwpm: add aperture device node index
Add Device_index tag to read IP perfmon register address
index from ACPI or DTSI tables. Device_index will be
used to retrieve resource information from acpi tables
or device trees. This will replace current logic to
procure resource details using device names.

JIRA THWPM-71

Change-Id: I964546f2262dd77ec0acfb58f49d044c870deae6
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797448
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2022-12-11 14:50:14 -08:00
Vedashree Vidwans
da9a29418a tegra: hwpm: replace dt_index with element_index
Currently, dt_index aperture spec actually holds the element index of
the aperture within the IP instance. Hence, replace dt_index with
element_index to better indicate its purpose.

JIRA THWPM-71

Change-Id: Ic805da3281c60991e7966a80f442d84a2cfcf7cc
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797447
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2022-12-11 14:50:10 -08:00
vasukis
afe35d034f tegra: hwpm: t234: Rename FORCE_ENABLE macro
The FORCE_ENABLE config flag is chip specific and
should include chip id. Hence update the force enable
config flag from CONFIG_HWPM_ALLOW_FORCE_ENABLE to
CONFIG_T234_HWPM_ALLOW_FORCE_ENABLE

Bug 3807813

Change-Id: I9d6626444eba5d3c56d8a28c9bfbaf7534617440
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2789722
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Sundeep Nagra <snagra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797446
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
2022-12-11 14:50:05 -08:00
Vedashree Vidwans
5166c3ab71 tegra: hwpm: add clk-rst HALs, update HAL validation
- Make clock reset functions into HALs. This way we can control
clock-reset logic for any chip. Set clock-reset HAL pointers to
appropriate functions.
- Remove clock-reset function wrappers as these will not be required and
corresponding HAL pointers will be used.
- As clock reset init is defined as a HAL, modify probe logic to
initialize chip info before invoking any HALs.
- Move common/primary HAL validation logic to common code and implement
new HAL to validate chip specific HALs. This way we can ensure that HAL
pointers are set as expected.
- Keep only one definition for t234_hwpm_init_chip_info as t234 should
always be initialized and hence only single definition should be
available.
- Expected return value of 0 indicates success and any other value
(mostly negative in current logic) indicates error, compare function
returns with 0 to print error in tegra_hwpm_release().
- Since a build can support both ACPI and device tree, update
init_chip_info() to retrieve chip information from ACPI and device tree
in case of failure.

Jira THWPM-41
Bug 3583624

Change-Id: I03fefae0b3b0c8ce46d175d39e4fdbb45e2bb22f
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2789668
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797445
2022-12-11 14:50:01 -08:00
Vedashree Vidwans
913f1b0697 tegra: hwpm: add checks for PMA quiesce state
- Zeroing of PMA trigger registers is unnecessary. Remove corresponding
logic from HWPM teardown function.
- During device open, add a check for PMA/RTR status. This will ensure
that PMA/RTR are ready to start new profiling session. Device open will
fail if RTR and PMA enginestatus is not ready(idle).
- SOC HWPM driver disables and releases all reserved IPs before teardown
steps. Update teardown logic to zero out IP allowlist registers during
teardown.

Jira THWPM-41
Bug 3714516

Change-Id: Iede5a5ed9860e2a73c8e4a04aeedfc061458c793
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776229
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2797444
2022-12-11 14:49:56 -08:00
Vedashree Vidwans
7c1ae11f78 tegra: hwpm: move files to appropriate path
HWPM files are copied from the previous source in linux-nvidia repo
withgit history. Create folders and move files to obtain expected folder
structure.

Bug 3787076

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
2022-10-05 16:05:20 -07:00
Vedashree Vidwans
fb84554a97 tegra: hwpm: add missing ref to iosys-map.h
dma_bf_map is renamed to iosys_map for kernels > 5.18.
- Update mem_bytes map function to use iosys_map for kernel versions
greater than 5.18.
- Add missing reference to iosys-map.h to include iosys_map definition.

Bug 3733730

Change-Id: I37f981dd8b2aa0154d783c35a645ab8d3d9faa3b
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2784481
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: Shanker Donthineni <sdonthineni@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-04 05:19:06 -07:00
Vedashree Vidwans
66d57599b1 tegra: hwpm: export IP register API's
export IP register API's so that it can be called from
loadable kernel modules.

Bug 3689682

Change-Id: Ic099cec4ca70ce87e9ed4bfedb207d1f6b5fcc71
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit I46805401ad9d765793a756e69b96c1d04f7c86c4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2767127
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
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: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Puneet Saxena <puneets@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-03 21:22:11 -07:00
Vedashree Vidwans
705bd5ac75 tegra: hwpm: add chip_info support for OOT
- Currently, kernel OOT doesn't support chip id info functions.
Introduce hwpm_soc_chip_info structure that holds soc info required by
the driver.
- Add function to initialize the chip info. Rename previous
tegra_hwpm_init_chip_info to tegra_hwpm_get_chip_info to avoid confusion
of the functionality.
- Implement tegra_hwpm_init_chip_info to initialize chip info structure
when OOT kernel is used. The implementation supports both ACPI and
device tree.
- Separate all chip info functions implementations for OOT kernel and
previous kernels. This cleans up the file and makes code more legible.
- Currently, tegra_hwpm_read_support_soc_tools_prop is only implemented
if device trees are accessible by the driver. Hence add condition to
execute the function only if ACPI is not supported.
- Add ACPI device table reference in the driver.
- Rename tegra_hwpm_next1_init_chip_info to
tegra_hwpm_next1_init_chip_ip_structures and similarly for all future
chips.

Bug 3768922
Jira THWPM-50

Change-Id: Id3f2c6952d7c9ec0343cda8dcf2dc7b936054ca7
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2783683
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 11:10:17 -07:00
Vedashree Vidwans
5e116ff176 tegra: hwpm: add support for next2 chip
- add next2 init chip info logic
- add next2 device id
- Update logic of chip info functions to support next2 chip. Modify the
functions to use formal "if defined()" macro instead of "ifdef".
- Execute support-soc-tools property only on silicon platform
- Separate OOT module_init symbol from postcore_init call on previos
kernel.

Jira THWPM-64

Change-Id: I408c99ff84507a685db6195cb71364d939931d53
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2757457
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-26 16:02:25 -07:00
Vedashree Vidwans
170c9552c8 tegra: hwpm: update dma buf pointer as per oot def
OOT definition of dma_buf_vmap() is changed to accept 2 arguments. The
second argumentt is used to return the dma mapping of the user buffer.
However, this output pointer is expected to point to an allocated
sma_buf_map structure. Add dma_buf_map structure as a member of struct
tegra_hwpm_mem_mgmt.

Bug 3768922

Change-Id: Ie776b7b7d0e364e6391212b9df87acbb4c43f1fa
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778946
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-26 16:02:19 -07:00
Vedashree Vidwans
f91708325e tegra: hwpm: move common hals to common path
Allowlist, get IP/resource info and perfmux disable HALs defined in t234
specific files do not require any chip specific details.
Move such functions to common files. This way common functions can be
reused by future chips, reducing maintainability of these functions.
Rename linux specific get_resource_info and get_floorsweep_info
functions to avoid multiple definitions.

Jira THPM-41

Change-Id: I0fc9eaf5b5d2591fa740939e1a43fe6911b5a378
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2780702
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-26 16:02:13 -07:00
Jon Hunter
ef085231d2 tegra: hwpm: Fix build for Linux v5.18
Upstream commit 7938f4218168 ("dma-buf-map: Rename to iosys-map")
renames 'struct dma_buf_map' to 'struct iosys_map' and this causes the
HWPM driver build to fail for Linux v5.18 and greater. Fix this by using
the appropriate structure name depending on kernel version.

Bug 3767126

Change-Id: I2f2b3839b27e3ac665180f45c811ffbef82199cc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778803
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-21 15:27:18 -07:00
Vedashree Vidwans
4cacfb709c tegra: hwpm: fix bugs and rearrange functions
Fix bugs for accessing uninitialized mem_mgmt and alist_map structures.
- Not initializing memory management functionality in HWPM is a valid
situation. Currently, tegra_hwpm_clear_mem_pipeline dereferences the
mem_mgmt pointer without validation, which can lead to failures. Check
if mem_mgmt struct pointer is valid before dereferencing.
- Alist_map structure is only required if user requests allowlist size
or list of allowlist registers. Currently, tegra_hwpm_sw_setup
dereferences alist_map pointer to set full_alist_size to 0. Add
alist_map allocation function and set full_alist_size to 0.
- Add PMA and CMD_ROUTER as valid cases for
tegra_hwpm_translate_soc_hwpm_resource() translation.
- Move logic to record IP function pointers to separate function. This
way changes to IP ops registration will be in single location.

Jira THWPM-41

Change-Id: I2c221bb13b6875b76a6fabee4c224d77ac72a6fc
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2770418
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
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:45 -07:00
Vedashree Vidwans
10cd01aa1a tegra: hwpm: use kstable available APIS
- Some of the APIs are not available on stable kernel. Use kstable
specific APIs with LINUX_KERNEL macro condition.
- Temporarily comment functions that are not available on Kstable.
- Next chip headers are renamed to accommodate more than one next chip.
Update next chip includes in init.c and driver.c files.
- Rename TEGRA_SOC_HWPM_IP_INACTIVE to TEGRA_HWPM_IP_INACTIVE to follow
other macro/enum naming convention.
- Use is_resource_active() HAL instead of chip specific function.
- Create clock reset functions that will allow us to handle change in
APIs on kstable.

Jira THWPM-41

Change-Id: I55f58fa51cf9ae96ee9a9565942e68b3b2bb76ee
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2764840
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-16 07:51:39 -07:00
Vedashree Vidwans
71664d7c99 tegra: hwpm: redo hwpm driver as OOT
Make HWPM driver as loadable kernel module.
Separate common, linux and t234 specific files into separate objects.
This will allow hwpm common files to be included in other projects.

Jira THWPM-41
Bug 3583624

Change-Id: Ia7472122c71520076a1516c8e386cfe79862dd61
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2683488
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
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:33 -07:00
Vedashree Vidwans
14d527e97a tegra: hwpm: fix reported coverity violations
- Declare and initialize timeout and mem_bytes_kernel_u32 variables.
- alist_map NULL pointer check is done after alist_map structure
references. Modify update_allowlist ioctl and release alist_map
functions to check alist_map NULL pointer before it's use.
- Checking if unsigned _IOC_NR(cmd) is less than zero has no effect.
Remove this check.
- Correct printf format specifier for mem_bytes_addr.

Bug 3461002

Change-Id: I79a97942e667c173d112bcaafb14ddcb8dd7d47f
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765676
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-29 05:16:22 -07:00
Vedashree Vidwans
d58dbfe5a9 tegra: hwpm: fix sparse violations
- Add new line required at the end of each file.
- Update tegra_hwpm_init_chip_info() as static function.

Bug 3528414

Change-Id: I27d3a7d3c3a03e3e0c63b0fcece6ffcdf008eae1
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2764963
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-29 05:16:16 -07:00
Vedashree Vidwans
738361e0e2 tegra: hwpm: add wrapper linux os structure
Currently, HWPM parent structure contains linux specific device
variables. In an effort to make HWPM driver OS agnostic, create Linux
specific wrapper HWPM structure tegra_hwpm_os_linux. Move linux specific
variables from tegra_soc_hwpm structure to tegra_hwpm_os_linux
structure.

Jira THWPM-60

Change-Id: I189cde92c5b83b327ccb467c72dee5756f16481d
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729700
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:47 -07:00
Vedashree Vidwans
2dd64aec0b tegra: hwpm: redefine uapi enums for internal use
- To make HWPM driver OS agnostic, redefine UAPI IP and resource enums
in HWPM header file. The redefined enums will be used internally in
driver logic.
- Rename force enable IP flag to include chip name. This will allow IPs
to be force enabled corresponding to the chip.

Jira THWPM-60

Change-Id: Ibe7ce6666b0e009e5183d591591f393037818052
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2747680
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:41 -07:00
Vedashree Vidwans
ed6dd8af44 tegra: hwpm: add wrapper for soc functions
Currently, linux specific SOC functions below are used in HWPM driver.
- find type of platform/config
- read fuse registers
- read device info
In order to make HWPM OS agnostic, add wrappers for SOC functions and/or
move code to os folder.

Jira THWPM-59

Change-Id: I8a7e824f3cffe7ae5c7e977b4b6690eb180958e4
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2743372
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:35 -07:00
Vedashree Vidwans
74dee85a03 tegra: hwpm: add wrapper for timeout functions
Move timeout related code using Linux APIs to os/linux path. Add OS
agnostic wrappers for timeout functions.

Jira THWPM-59

Change-Id: I8e6aa8dabd3a54ecc8a946090d11d036c97a104b
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2735074
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:30 -07:00
Vedashree Vidwans
486ec4a24c tegra: hwpm: create memory buffer structures
Stream and allowlist buffers are allocated by the user as dma buffers
and mapped in virtual address space by the driver. The DMA and mapping
functions are linux specific. Hence create memory management and
allowlist linux structures. Add these linux memory structure pointers in
the tegra_hwpm parent structure.

Jira THWPM-60

Change-Id: I2526f2bab835df4c5a922b0b375c22a6247aad30
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729664
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:24 -07:00
Vedashree Vidwans
378bd9bb1c tegra: hwpm: move linux specific code to os folder
To make HWPM driver OS agnostic, remove linux specific includes from
common and chip specific files.
- Move IP register list related logic to os linux folder.
- tegra_hwpm_get_floorsweep_info() and tegra_hwpm_get_resource_info()
refer to linux specific UAPI structures. Relocate these functions to os
folder.
- Use tegra_hwpm_ip_ops structure in HWPM driver internal logic. Move
or rewrite functions using tegra_soc_hwpm_ip_ops.

Jira THWPM-59

Change-Id: I1dd1e088d59fdc44923d2b6502bb0cf350ce57a6
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729471
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-08-20 23:29:18 -07:00
Vedashree Vidwans
8f3cb60584 tegra: hwpm: add wrapper for log functions
In an effort to make HWPM driver OS agnostic, add wrapper for log
functions.

Jira THWPM-59

Change-Id: I27ba6fac4c4f87c113c3d2cf8c62214bf4db1329
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2740404
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-08-12 15:51:05 -07:00
Vedashree Vidwans
ae38729467 tegra: hwpm: move linux APIs in aperture to os
Perfmux/perfmon reserve and release functions use linux APIs to
map/unmap mmio apertures. In an effort to make HWPM driver OS agnostic,
add wrappers to reserve and release apertures.

Jira THWPM-59

Change-Id: I2e8e820ae0b7c46f5656e8dfd2cf7ef370f168cc
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738157
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-08-12 15:50:59 -07:00
Vedashree Vidwans
42a33fd9d0 tegra: hwpm: add wrappers for io functions
In an effort to make HWPM driver OS agnostic, add wrappers for io
functions.

Jira THWPM-59

Change-Id: I9309ee15a965aa3d2f122ef959eec211c9a84623
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738156
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-08-12 15:50:52 -07:00