diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2013-02-12 11:55:09 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:58:10 -0700 |
commit | 7ba008fbb3b5b4b566586cb29e0a75a588743c80 (patch) | |
tree | e238898ccf6d6a188ff5e96e5085db19624291c1 /arch/arm/mach-tegra/edp.c | |
parent | 46e91b5572fe43a524dc2fc41df65618322f6011 (diff) |
ARM: tegra11: Include temperature offset to CPU EDP management
Fixed setting of DOWN threshold by adjusting hysteresis correctly for
precision. Made temperatures array be at 4 degree intervals above 70C
because of 2C rounding required for soctherm temperature thresholds.
Bug 1233302
Change-Id: I2dc0966fdc3ba81d6e29b8dd0095b165bf2ae7bc
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/200216
(cherry picked from commit 33b146ef361242ba1d6752f7de3bfde49056896b)
Reviewed-on: http://git-master/r/201983
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/edp.c')
-rw-r--r-- | arch/arm/mach-tegra/edp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c index f789d8b3faff..3ceebe76a4fb 100644 --- a/arch/arm/mach-tegra/edp.c +++ b/arch/arm/mach-tegra/edp.c @@ -333,7 +333,7 @@ static struct tegra_system_edp_entry power_edp_default_limits[] = { /* Constants for EDP calculations */ static const int temperatures[] = { /* degree celcius (C) */ - 23, 40, 50, 60, 70, 75, 80, 85, 90, 95, 100, 105, + 23, 40, 50, 60, 70, 74, 78, 82, 86, 90, 94, 98, 102, }; static const int power_cap_levels[] = { /* milliwatts (mW) */ 500, 1000, 1500, 2000, 2500, 3000, 3500, @@ -626,7 +626,7 @@ static int init_cpu_edp_limits_calculated(void) for (n_cores_idx = 0; n_cores_idx < NR_CPUS; n_cores_idx++) { for (temp_idx = 0; temp_idx < ARRAY_SIZE(temperatures); temp_idx++) { - edp_calculated_limits[temp_idx]. temperature = + edp_calculated_limits[temp_idx].temperature = temperatures[temp_idx]; limit = edp_calculate_maxf(params, temperatures[temp_idx], @@ -831,7 +831,8 @@ void tegra_get_system_edp_limits(const unsigned int **limits) *limits = system_edp_limits; } -void tegra_platform_edp_init(struct thermal_trip_info *trips, int *num_trips) +void tegra_platform_edp_init(struct thermal_trip_info *trips, + int *num_trips, int margin) { const struct tegra_edp_limits *cpu_edp_limits; struct thermal_trip_info *trip_state; @@ -851,7 +852,7 @@ void tegra_platform_edp_init(struct thermal_trip_info *trips, int *num_trips) trip_state->cdev_type = "cpu_edp"; trip_state->trip_temp = - cpu_edp_limits[i].temperature * 1000; + (cpu_edp_limits[i].temperature * 1000) - margin; trip_state->trip_type = THERMAL_TRIP_ACTIVE; trip_state->upper = trip_state->lower = i + 1; trip_state->hysteresis = 1000; |