]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra13: soctherm: restore orig threshold
authorDiwakar Tundlam <dtundlam@nvidia.com>
Tue, 15 Apr 2014 01:10:28 +0000 (18:10 -0700)
committerSeema Khowala <seemaj@nvidia.com>
Wed, 23 Apr 2014 21:05:14 +0000 (14:05 -0700)
For certain older revs of ATE, we will use use PLL-TSOSC (instead of
the CPU-TSOSCs) on T132 devices to drive throttling (HW and SW) and
shutdown to avoid random shutdown issues seen on some platforms.

Revert T132-specific hacks in soctherm driver to prepare for the
change, which is done in per-platform board-files.

Bug 1468124

Change-Id: Iac8152045915ac59db45c9b30103dbbb13a784b2
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/395413

arch/arm/mach-tegra/tegra11_soctherm.c

index 7c2a8ae4168ec69efc8c9274679c18b30c032224..d629b6e757a81002dbb866396bf59a7fb5d1f77a 100644 (file)
@@ -730,17 +730,6 @@ static int soctherm_ocx_to_wake_gpio[TEGRA_SOC_OC_IRQ_MAX] = {
 static int sensor2therm_a[TSENSE_SIZE];
 static int sensor2therm_b[TSENSE_SIZE];
 
-static struct pid_thermal_gov_params t13_pid_params = {
-       .max_err_temp = 12000,
-       /* other fields are same */
-};
-
-struct soctherm_therm t13_therm = {
-       .passive_delay = 500,
-       .hotspot_offset = 0,
-       /* other fields are same */
-};
-
 /**
  * div64_s64_precise() - wrapper for div64_s64()
  * @a: the dividend
@@ -1642,7 +1631,6 @@ static int __init soctherm_thermal_sys_init(void)
 {
        char name[THERMAL_NAME_LENGTH];
        struct soctherm_therm *therm;
-       struct pid_thermal_gov_params *gov;
        bool oc_en = false;
        int i, j;
 
@@ -1676,13 +1664,6 @@ static int __init soctherm_thermal_sys_init(void)
                        }
                }
 
-               /* XXX: temporarily adjust paramters for T132 */
-               if (IS_T13X) {
-                       gov = therm->tzp->governor_params;
-                       gov->max_err_temp = t13_pid_params.max_err_temp;
-                       therm->passive_delay = t13_therm.passive_delay;
-               }
-
                snprintf(name, THERMAL_NAME_LENGTH, "%s-therm", therm_names[i]);
                soctherm_th_zones[i] = thermal_zone_device_register(
                                                name,
@@ -2882,26 +2863,9 @@ static int soctherm_init_platform_data(void)
                                        i, j, therm->trips[j].trip_temp);
                                therm->trips[j].trip_temp -= rem;
                        }
-
-                       /* XXX: temporarily lower thresholds for T132 */
-                       if (IS_T13X) {
-                               if (therm->trips[j].trip_type ==
-                                                       THERMAL_TRIP_HOT)
-                                       therm->trips[j].trip_temp -= 2000;
-                               else if (therm->trips[j].trip_type ==
-                                                       THERMAL_TRIP_PASSIVE)
-                                       therm->trips[j].trip_temp -= 5000;
-                       }
                }
        }
 
-       /* XXX: temporarily use ZERO hotspot offset for T132 */
-       if (IS_T13X) {
-               plat_data.therm[THERM_CPU].hotspot_offset = 0;
-               plat_data.therm[THERM_GPU].hotspot_offset = 0;
-               plat_data.therm[THERM_MEM].hotspot_offset = 0;
-       }
-
        /* Program hotspot offsets per THERM */
        r = REG_SET(0, TS_HOTSPOT_OFF_CPU,
                    plat_data.therm[THERM_CPU].hotspot_offset / 1000);