diff --git a/drivers/tegra/hwpm/include/tegra_hwpm.h b/drivers/tegra/hwpm/include/tegra_hwpm.h index e8df843..6d7ce89 100644 --- a/drivers/tegra/hwpm/include/tegra_hwpm.h +++ b/drivers/tegra/hwpm/include/tegra_hwpm.h @@ -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 * 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_MCF, TEGRA_HWPM_IP_APE, + TEGRA_HWPM_IP_C2C, TERGA_HWPM_NUM_IPS }; @@ -86,6 +87,7 @@ enum tegra_hwpm_resource_enum { TEGRA_HWPM_RESOURCE_PMA, TEGRA_HWPM_RESOURCE_CMD_SLICE_RTR, TEGRA_HWPM_RESOURCE_APE, + TEGRA_HWPM_RESOURCE_C2C, TERGA_HWPM_NUM_RESOURCES }; diff --git a/drivers/tegra/hwpm/os/linux/ip_utils.c b/drivers/tegra/hwpm/os/linux/ip_utils.c index e822e52..f206dcc 100644 --- a/drivers/tegra/hwpm/os/linux/ip_utils.c +++ b/drivers/tegra/hwpm/os/linux/ip_utils.c @@ -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 * 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: ip_enum_idx = TEGRA_HWPM_IP_APE; break; + case TEGRA_SOC_HWPM_IP_C2C: + ip_enum_idx = TEGRA_HWPM_IP_C2C; + break; default: tegra_hwpm_err(hwpm, "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: res_enum_idx = TEGRA_HWPM_RESOURCE_APE; break; + case TEGRA_SOC_HWPM_RESOURCE_C2C: + res_enum_idx = TEGRA_HWPM_RESOURCE_C2C; + break; default: tegra_hwpm_err(hwpm, "Queried enum tegra_soc_hwpm_resource %d is invalid", diff --git a/include/uapi/linux/tegra-soc-hwpm-uapi.h b/include/uapi/linux/tegra-soc-hwpm-uapi.h index 1be1607..8a6ea42 100644 --- a/include/uapi/linux/tegra-soc-hwpm-uapi.h +++ b/include/uapi/linux/tegra-soc-hwpm-uapi.h @@ -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 * 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_MCF, TEGRA_SOC_HWPM_IP_APE, + TEGRA_SOC_HWPM_IP_C2C, 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_APE, - + TEGRA_SOC_HWPM_RESOURCE_C2C, TERGA_SOC_HWPM_NUM_RESOURCES };