Commit Graph

6 Commits

Author SHA1 Message Date
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
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
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
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
4f1e352286 tegra: hwpm: rename source files
Shorten source file names by removing "tegra_hwpm" prefix. This will
make understanding the code more legible.

Jira THWPM-58

Change-Id: I39aac11c9f2a763a254b0605f9d96a7b0f372992
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729469
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:20 -07:00