mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-23 18:01:07 +03:00
tegra: hwpm: add HALs to support multiple chip
Add below HALs to make code chip agnostic. This will allow us to use t234 specific HALs for next chips. - get_pma_int_idx: get PMA's internal index corresponding to active chip - get_rtr_int_idx: get RTR's internal index corresponding to active chip - get_ip_max_idx: get MAX IP index corresponding to active chip Move chip agnostic code to common files. Jira THWPM-41 Change-Id: I5518469b1473fe7f66b6517cee729cf46520bbac Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675515 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
This commit is contained in:
committed by
mobile promotions
parent
53f8d0799c
commit
ea5e4e406b
@@ -84,11 +84,17 @@ void tegra_soc_hwpm_ip_register(struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops)
|
||||
struct tegra_soc_hwpm *hwpm = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if (hwpm_ip_ops == NULL) {
|
||||
tegra_hwpm_err(NULL, "IP details missing");
|
||||
return;
|
||||
}
|
||||
|
||||
if (tegra_soc_hwpm_pdev == NULL) {
|
||||
ret = tegra_hwpm_note_ip_register(hwpm_ip_ops);
|
||||
if (ret != 0) {
|
||||
tegra_hwpm_err(NULL,
|
||||
"Couldn't save IP register details");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (hwpm_ip_ops->ip_dev == NULL) {
|
||||
@@ -118,6 +124,11 @@ void tegra_soc_hwpm_ip_unregister(struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops)
|
||||
struct tegra_soc_hwpm *hwpm = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if (hwpm_ip_ops == NULL) {
|
||||
tegra_hwpm_err(NULL, "IP details missing");
|
||||
return;
|
||||
}
|
||||
|
||||
if (tegra_soc_hwpm_pdev == NULL) {
|
||||
tegra_hwpm_dbg(hwpm, hwpm_info, "HWPM device not available");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user