diff options
author | Alex Frid <afrid@nvidia.com> | 2012-12-28 21:18:47 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2013-01-03 17:37:55 -0800 |
commit | 356cec5d26b07603e2014aedaf197354b52ee1d6 (patch) | |
tree | 6799e36a8e9c3c98e7e85e76f2c783afd4e0bd55 /arch/arm/mach-tegra/edp.c | |
parent | ed3bce21e55904fbc875ad1c8e50069fb19bfcc6 (diff) |
ARM: tegra11: power: Add CPU EDP safety limits
Added fixed absolute CPU EDP safety limits that are applied on top
of calculated EDP limits across all temperatures and process corners.
Bug 1161126
Change-Id: I9cb33a0a94115a83220d9b70950823fcbbf96427
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/187570
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/edp.c')
-rw-r--r-- | arch/arm/mach-tegra/edp.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c index 033bb81d2437..48d5ca16c6e2 100644 --- a/arch/arm/mach-tegra/edp.c +++ b/arch/arm/mach-tegra/edp.c @@ -388,6 +388,7 @@ static struct tegra_edp_cpu_leakage_params leakage_params[] = { { 15618709, -4576116, 158401, -1538, }, }, }, + .safety_cap = { 1810500, 1810500, 1606500, 1606500 }, }, { .cpu_speedo_id = 2, /* A01P+ fast CPU */ @@ -419,6 +420,7 @@ static struct tegra_edp_cpu_leakage_params leakage_params[] = { { 15618709, -4576116, 158401, -1538, }, }, }, + .safety_cap = { 1912500, 1912500, 1708500, 1708500 }, }, }; @@ -625,13 +627,22 @@ static int init_cpu_edp_limits_calculated(void) for (temp_idx = 0; temp_idx < ARRAY_SIZE(temperatures); temp_idx++) { edp_calculated_limits[temp_idx]. temperature = temperatures[temp_idx]; - for (n_cores_idx = 0; n_cores_idx < NR_CPUS; n_cores_idx++) - edp_calculated_limits[temp_idx]. - freq_limits[n_cores_idx] = + for (n_cores_idx = 0; n_cores_idx < NR_CPUS; n_cores_idx++) { + unsigned int cap; + unsigned int limit = edp_calculate_maxf(params, temperatures[temp_idx], iddq_mA, n_cores_idx); + /* apply safety cap if it is specified */ + if (n_cores_idx < 4) { + cap = params->safety_cap[n_cores_idx]; + if (cap && cap < limit) + limit = cap; + } + edp_calculated_limits[temp_idx]. + freq_limits[n_cores_idx] = limit; + } } /* |