arm: tegra: power: update model parameters for VDD_CPU EDP
Diwakar Tundlam [Fri, 2 Nov 2012 00:45:06 +0000 (17:45 -0700)]
Bug 1167145

Change-Id: I485d86c42c90351b3207f5dbd1b7b5a8188b6e50
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/160721
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

arch/arm/mach-tegra/edp.c
arch/arm/mach-tegra/include/mach/edp.h

index 4a50188..95d9521 100644 (file)
@@ -329,32 +329,32 @@ static int temperatures[] = { 23, 40, 50, 60, 70, 75, 80, 85, 90, 95 };
 static struct tegra_edp_cpu_leakage_params leakage_params[] = {
        {
                .cpu_speedo_id      = 0, /* SKU 0 */
-               .dyn_consts_n       = { 1560207, 2378136, 3196066, 4013995 },
-               .leakage_consts_n   = {  641026,  757576,  878500, 1000000 },
+               .dyn_consts_n       = { 1091747, 2035205, 2978661, 3922119 },
+               .leakage_consts_n   = {  538991,  752463,  959441, 1150000 },
                .leakage_consts_ijk = {
                         /* i = 0 */
-                        { { 0, -21481846,   519650,  -3254 }, /* j = 0 */
-                          { 0,  65678948, -1572498,   9850 }, /* j = 1 */
-                          { 0, -65988168,  1565063,  -9808 }, /* j = 2 */
-                          { 0,  22109316,  -522158,   3281 }, /* j = 3 */
+                        { {  -42746668,   -5458429,   164998,  -1711, },
+                          {  178262421,   13375684,  -411791,   4590, },
+                          { -228866784,  -10482993,   331248,  -4062, },
+                          {   94301550,    2618719,   -85983,   1193, },
                         },
                         /* i = 1 */
-                        { { 0,  24840561,  -565618,   5196 }, /* j = 0 */
-                          { 0, -65603470,  1592186, -13823 }, /* j = 1 */
-                          { 0,  56585242, -1488977,  12944 }, /* j = 2 */
-                          { 0, -14740016,   470284,  -3670 }, /* j = 3 */
+                        { { -256611791,   49677413, -1655785,  14917, },
+                          {  584675433, -132620939,  4541560, -41812, },
+                          { -398106336,  115987156, -4102328,  38737, },
+                          {   68897184,  -33030745,  1217839, -11801, },
                         },
                         /* i = 2 */
-                        { { 0,  -7050232,   244771,  -1779 }, /* j = 0 */
-                          { 0,  20985919,  -701848,   5008 }, /* j = 1 */
-                          { 0, -20478304,   677782,  -4766 }, /* j = 2 */
-                          { 0,   7093793,  -218579,   1454 }, /* j = 3 */
+                        { {  186324676,  -36019083,  1177969, -10669, },
+                          { -439237936,   98429131, -3276444,  30301, },
+                          {  315060898,  -88635036,  3004777, -28474, },
+                          {  -60854399,   26267188,  -907121,   8844, },
                         },
                         /* i = 3 */
-                        { { 0,    942881,   -29599,    203 }, /* j = 0 */
-                          { 0,  -2750253,    84116,   -569 }, /* j = 1 */
-                          { 0,   2643026,   -80080,    536 }, /* j = 2 */
-                          { 0,   -868855,    25062,   -161 }, /* j = 3 */
+                        { {  -35432997,    6154621,  -202200,   1830, },
+                          {   87402153,  -16908683,   565152,  -5220, },
+                          {  -67775314,   15326770,  -521221,   4927, },
+                          {   15618709,   -4576116,   158401,  -1538, },
                         },
                 },
        },
@@ -416,10 +416,10 @@ unsigned int edp_calculate_maxf(struct tegra_edp_cpu_leakage_params *params,
                                                          edp_pow(1000, j));
                                        leakage_calc_step *=
                                                edp_pow(temp_C, k);
-                                       /* leakage_consts_ijk was X 1,000,000 */
+                                       /* leakage_consts_ijk was X 100,000 */
                                        leakage_calc_step =
                                                div64_s64(leakage_calc_step,
-                                                         1000000);
+                                                         100000);
                                        leakage_mA += leakage_calc_step;
                                }
                        }
index f024fd1..c7c8fa7 100644 (file)
@@ -45,10 +45,9 @@ struct tegra_system_edp_entry {
 
 struct tegra_edp_cpu_leakage_params {
        int cpu_speedo_id;
-       /* All constants are pre-multiplied by 1,000,000 */
-       int dyn_consts_n[NR_CPUS];
-       int leakage_consts_n[NR_CPUS];
-       int leakage_consts_ijk[4][4][4];
+       int dyn_consts_n[NR_CPUS];       /* pre-multiplied by 1,000,000 */
+       int leakage_consts_n[NR_CPUS];   /* pre-multiplied by 1,000,000 */
+       int leakage_consts_ijk[4][4][4]; /* pre-multiplied by 100,000 */
 };
 
 struct tegra_edp_freq_voltage_table {