ARM: tegra: soctherm: set initial soctherm values
Joshua Primero [Sat, 20 Oct 2012 19:54:16 +0000 (12:54 -0700)]
Set initial soctherm values. This is in preparation for enabling
the hardware.

Change-Id: Id7ad43b39ede0177a3916b9210b7a2e4fbd6eaa6
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/146156
(cherry picked from commit d7cd52519608dd2273105be03a2aab4967f5a3bb)
Reviewed-on: http://git-master/r/159499
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/board-pluto-power.c
arch/arm/mach-tegra/tegra11_soctherm.c

index 9415f28..5668a1d 100644 (file)
@@ -1230,33 +1230,6 @@ static struct soctherm_platform_data dalmore_soctherm_data = {
                        .pdiv = 10,
                },
        },
-
-       .therm = {
-               [THERM_CPU] = {
-                       .thermtrip = 90, /* in C */
-                       .hw_backstop = 37, /* in C */
-
-                       .trip_temp = 68000, /* in mC */
-                       .tc1 = 0,
-                       .tc2 = 1,
-                       .passive_delay = 2000,
-               },
-       },
-
-       .throttle = {
-               [THROTTLE_HEAVY] = {
-                       .priority = 1,
-                       .devs = {
-                               [THROTTLE_DEV_CPU] = {
-                                       .enable = true,
-                                       .dividend = 1,
-                                       .divisor = 255,
-                                       .step = 0,
-                                       .duration = 65535,
-                               },
-                       },
-               },
-       },
 };
 
 static struct balanced_throttle tj_throttle = {
index d36bb68..ccbae4d 100644 (file)
@@ -790,33 +790,6 @@ static struct soctherm_platform_data pluto_soctherm_data = {
                        .pdiv = 10,
                },
        },
-
-       .therm = {
-               [THERM_CPU] = {
-                       .thermtrip = 90, /* in C */
-                       .hw_backstop = 37, /* in C */
-
-                       .trip_temp = 68000, /* in mC */
-                       .tc1 = 0,
-                       .tc2 = 1,
-                       .passive_delay = 2000,
-               },
-       },
-
-       .throttle = {
-               [THROTTLE_HEAVY] = {
-                       .priority = 1,
-                       .devs = {
-                               [THROTTLE_DEV_CPU] = {
-                                       .enable = true,
-                                       .dividend = 1,
-                                       .divisor = 255,
-                                       .step = 0,
-                                       .duration = 65535,
-                               },
-                       },
-               },
-       },
 };
 
 static struct balanced_throttle tj_throttle = {
index cbab6d1..ab4e90f 100644 (file)
@@ -645,7 +645,7 @@ int __init tegra11_soctherm_init(struct soctherm_platform_data *data)
 
        /* Enable Level 0 */
        r = soctherm_readl(CTL_LVL0_CPU0);
-       r = REG_SET(r, CTL_LVL0_CPU0_EN, 1);
+       r = REG_SET(r, CTL_LVL0_CPU0_EN, !!therm[THERM_CPU].trip_temp);
        soctherm_writel(r, CTL_LVL0_CPU0);
 
        /* Thermtrip */