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>
This commit is contained in:
vasukis
2023-01-03 20:27:40 +00:00
committed by mobile promotions
parent dd4f96e5c9
commit 1bbda26d7d
3 changed files with 13 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -58,6 +58,7 @@ enum tegra_hwpm_ip_enum {
TEGRA_HWPM_IP_MSS_ISO_NISO_HUBS, TEGRA_HWPM_IP_MSS_ISO_NISO_HUBS,
TEGRA_HWPM_IP_MSS_MCF, TEGRA_HWPM_IP_MSS_MCF,
TEGRA_HWPM_IP_APE, TEGRA_HWPM_IP_APE,
TEGRA_HWPM_IP_C2C,
TERGA_HWPM_NUM_IPS TERGA_HWPM_NUM_IPS
}; };
@@ -86,6 +87,7 @@ enum tegra_hwpm_resource_enum {
TEGRA_HWPM_RESOURCE_PMA, TEGRA_HWPM_RESOURCE_PMA,
TEGRA_HWPM_RESOURCE_CMD_SLICE_RTR, TEGRA_HWPM_RESOURCE_CMD_SLICE_RTR,
TEGRA_HWPM_RESOURCE_APE, TEGRA_HWPM_RESOURCE_APE,
TEGRA_HWPM_RESOURCE_C2C,
TERGA_HWPM_NUM_RESOURCES TERGA_HWPM_NUM_RESOURCES
}; };

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -84,6 +84,9 @@ static u32 tegra_hwpm_translate_soc_hwpm_ip(struct tegra_soc_hwpm *hwpm,
case TEGRA_SOC_HWPM_IP_APE: case TEGRA_SOC_HWPM_IP_APE:
ip_enum_idx = TEGRA_HWPM_IP_APE; ip_enum_idx = TEGRA_HWPM_IP_APE;
break; break;
case TEGRA_SOC_HWPM_IP_C2C:
ip_enum_idx = TEGRA_HWPM_IP_C2C;
break;
default: default:
tegra_hwpm_err(hwpm, tegra_hwpm_err(hwpm,
"Queried enum tegra_soc_hwpm_ip %d is invalid", "Queried enum tegra_soc_hwpm_ip %d is invalid",
@@ -186,6 +189,9 @@ u32 tegra_hwpm_translate_soc_hwpm_resource(struct tegra_soc_hwpm *hwpm,
case TEGRA_SOC_HWPM_RESOURCE_APE: case TEGRA_SOC_HWPM_RESOURCE_APE:
res_enum_idx = TEGRA_HWPM_RESOURCE_APE; res_enum_idx = TEGRA_HWPM_RESOURCE_APE;
break; break;
case TEGRA_SOC_HWPM_RESOURCE_C2C:
res_enum_idx = TEGRA_HWPM_RESOURCE_C2C;
break;
default: default:
tegra_hwpm_err(hwpm, tegra_hwpm_err(hwpm,
"Queried enum tegra_soc_hwpm_resource %d is invalid", "Queried enum tegra_soc_hwpm_resource %d is invalid",

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -44,6 +44,7 @@ enum tegra_soc_hwpm_ip {
TEGRA_SOC_HWPM_IP_MSS_ISO_NISO_HUBS, TEGRA_SOC_HWPM_IP_MSS_ISO_NISO_HUBS,
TEGRA_SOC_HWPM_IP_MSS_MCF, TEGRA_SOC_HWPM_IP_MSS_MCF,
TEGRA_SOC_HWPM_IP_APE, TEGRA_SOC_HWPM_IP_APE,
TEGRA_SOC_HWPM_IP_C2C,
TERGA_SOC_HWPM_NUM_IPS TERGA_SOC_HWPM_NUM_IPS
}; };
@@ -110,7 +111,7 @@ enum tegra_soc_hwpm_resource {
*/ */
TEGRA_SOC_HWPM_RESOURCE_CMD_SLICE_RTR, TEGRA_SOC_HWPM_RESOURCE_CMD_SLICE_RTR,
TEGRA_SOC_HWPM_RESOURCE_APE, TEGRA_SOC_HWPM_RESOURCE_APE,
TEGRA_SOC_HWPM_RESOURCE_C2C,
TERGA_SOC_HWPM_NUM_RESOURCES TERGA_SOC_HWPM_NUM_RESOURCES
}; };