Commit Graph

6 Commits

Author SHA1 Message Date
Vedashree Vidwans
ae2a1e7dfc tegra: hwpm: redraft regops ioctl return status
- As regops ioctl status is an output from kernel, the status cannot be
invalid. So, remove TEGRA_SOC_HWPM_REG_OP_STATUS_INVALID define.
- Redefine regops ioctl status to make SUCCESS equivalent to value 0.
- Add TEGRA_SOC_HWPM_REG_OP_STATUS_WR_FAILED to indicate failure in
regops write command.

Bug 3335825

Change-Id: I31152f1ce2558fdf4c8829dd19fbcb9c87e20572
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2556234
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-07-16 19:56:52 -07:00
Vedashree Vidwans
492dd01e04 tegra: hwpm: enable clock/reset/unpowergate sequence
Enable clock/reset/unpowergate sequence for silicon.

THWPM-2

Change-Id: I5a9ad97b053b8b8b2409077e99cb206dcc4b544f
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2556233
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-07-16 19:56:47 -07:00
Vedashree Vidwans
0cb6f6b48f tegra: hwpm: t234: add generated hw headers
- Generate HWPM hw headers using register generator tool.
- Add required hw headers to include/hw/ path
- Update driver code to replace static hw defines with hw header
definitions.
- Remove unused static hw defines.

THWPM-39

Change-Id: I57566d51657bb6b22c4b581acd257f1871438adf
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2552741
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-07-12 23:35:58 -07:00
Seshendra Gadagottu
78465d56ca t23x: hwpm: fix NULL pointer in exec_reg_ops_ioctl
First do the assignment to reg_op before referring it in
debug print info.

Bug 200702306

Change-Id: Ic0a5ea352793858a746e6fd28759b41e99270be6
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2532594
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-05-21 20:01:11 -07:00
Seshendra Gadagottu
ce130e224f t23x: hwpm: fix issue in tegra_soc_hwpm_open
For successful tegra_soc_hwpm_open, return success without
falling through failure case.

Added debug info in tegra_soc_hwpm_open function to
indicate failure case.

Bug 200702306

Change-Id: Ib107d9a89c185d913dc88843e750f36765790bbf
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2532084
Tested-by: Vedashree Vidwans <vvidwans@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-05-21 20:00:32 -07:00
Adeel Raza
70941decf9 tegra: hwpm: add SOC HWPM driver
Add a driver for programming the Tegra SOC HWPM path. SOC HWPM allows
performance monitoring of various Tegra IPs.

The profiling tests cases are configured through IOCTLs sent by a
userspace profiling app. The IOCTLs provide the following features:
  - IP discovery and reservation
  - Buffer management
  - Whitelist query
  - Register read/write ops

Bug 200702306
Bug 3305495

Change-Id: I65003b126e01bd03d856767c55aa2424bcfd11fb
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2515148
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-05-19 00:33:31 -07:00