mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: add fa mode fuse condition
If FA mode fuse is set, allow all IPs to be enabled irrespective of build config. Bug 3435123 Change-Id: I937d8f9fa79706167102daadd9c3a04a80180cfb Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2720737 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
5c8a07022f
commit
72aa834670
@@ -195,6 +195,7 @@ int t234_hwpm_validate_current_config(struct tegra_soc_hwpm *hwpm)
|
|||||||
{
|
{
|
||||||
u32 production_mode = 0U;
|
u32 production_mode = 0U;
|
||||||
u32 security_mode = 0U;
|
u32 security_mode = 0U;
|
||||||
|
u32 fa_mode = 0U;
|
||||||
u32 hwpm_global_disable = 0U;
|
u32 hwpm_global_disable = 0U;
|
||||||
u32 idx = 0U;
|
u32 idx = 0U;
|
||||||
int err;
|
int err;
|
||||||
@@ -221,6 +222,13 @@ int t234_hwpm_validate_current_config(struct tegra_soc_hwpm *hwpm)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TEGRA_FUSE_FA_MODE 0x48U
|
||||||
|
err = tegra_fuse_readl(TEGRA_FUSE_FA_MODE, &fa_mode);
|
||||||
|
if (err != 0) {
|
||||||
|
tegra_hwpm_err(hwpm, "fa mode fuse read failed");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
#define TEGRA_HWPM_GLOBAL_DISABLE_OFFSET 0x3CU
|
#define TEGRA_HWPM_GLOBAL_DISABLE_OFFSET 0x3CU
|
||||||
#define TEGRA_HWPM_GLOBAL_DISABLE_DISABLED 0x1U
|
#define TEGRA_HWPM_GLOBAL_DISABLE_DISABLED 0x1U
|
||||||
err = tegra_hwpm_read_sticky_bits(hwpm, addr_map_pmc_misc_base_r(),
|
err = tegra_hwpm_read_sticky_bits(hwpm, addr_map_pmc_misc_base_r(),
|
||||||
@@ -231,8 +239,16 @@ int t234_hwpm_validate_current_config(struct tegra_soc_hwpm *hwpm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tegra_hwpm_dbg(hwpm, hwpm_info, "PROD_MODE fuse = 0x%x "
|
tegra_hwpm_dbg(hwpm, hwpm_info, "PROD_MODE fuse = 0x%x "
|
||||||
"SECURITY_MODE fuse = 0x%x HWPM_GLOBAL_DISABLE = 0x%x",
|
"SECURITY_MODE fuse = 0x%x FA mode fuse = 0x%x"
|
||||||
production_mode, security_mode, hwpm_global_disable);
|
"HWPM_GLOBAL_DISABLE = 0x%x",
|
||||||
|
production_mode, security_mode, fa_mode, hwpm_global_disable);
|
||||||
|
|
||||||
|
/* Do not enable override if FA mode fuse is set */
|
||||||
|
if (fa_mode != 0U) {
|
||||||
|
tegra_hwpm_dbg(hwpm, hwpm_info,
|
||||||
|
"fa mode fuse enabled, no override required");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Override enable depends on security mode and global hwpm disable */
|
/* Override enable depends on security mode and global hwpm disable */
|
||||||
if ((security_mode == 0U) &&
|
if ((security_mode == 0U) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user