tegra: hwpm: th500: Add support for MCF SOC

This patch adds support for MCF SOC performance
monitoring in the driver. MCF SOC has two different
types of perfmuxes connected to the same perfmon:
one is the OCU type and the other is IBHX and OBHX.
IBHX is only accessible via MC16 aperture. Therefore,
this patch adds two separate IPs: OCU and IOBHX.
However, both are tied to the MCF SOC perfmon (mcfsoc0).

Bug 4287384

Signed-off-by: Vishal Aslot <vaslot@nvidia.com>
Change-Id: If15498a44e02270f9106337078931edbe043c254
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2986232
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
This commit is contained in:
Vishal Aslot
2023-09-27 01:16:22 +00:00
committed by mobile promotions
parent b689a36372
commit 2f26b5849e
13 changed files with 647 additions and 16 deletions

View File

@@ -108,6 +108,12 @@ static u32 tegra_hwpm_translate_soc_hwpm_ip(struct tegra_soc_hwpm *hwpm,
case TEGRA_SOC_HWPM_IP_MSS_HUB:
ip_enum_idx = TEGRA_HWPM_IP_MSS_HUB;
break;
case TEGRA_SOC_HWPM_IP_MCF_OCU:
ip_enum_idx = TEGRA_HWPM_IP_MCF_OCU;
break;
case TEGRA_SOC_HWPM_IP_MCF_IOBHX:
ip_enum_idx = TEGRA_HWPM_IP_MCF_IOBHX;
break;
default:
tegra_hwpm_err(hwpm,
"Queried enum tegra_soc_hwpm_ip %d is invalid",
@@ -231,6 +237,12 @@ u32 tegra_hwpm_translate_soc_hwpm_resource(struct tegra_soc_hwpm *hwpm,
case TEGRA_SOC_HWPM_RESOURCE_MSS_HUB:
res_enum_idx = TEGRA_HWPM_RESOURCE_MSS_HUB;
break;
case TEGRA_SOC_HWPM_RESOURCE_MCF_OCU:
res_enum_idx = TEGRA_HWPM_RESOURCE_MCF_OCU;
break;
case TEGRA_SOC_HWPM_RESOURCE_MCF_IOBHX:
res_enum_idx = TEGRA_HWPM_RESOURCE_MCF_IOBHX;
break;
default:
tegra_hwpm_err(hwpm,
"Queried enum tegra_soc_hwpm_resource %d is invalid",