arm: tegra: power: check chip-id and select table or calculated edp
Diwakar Tundlam [Tue, 9 Oct 2012 23:08:44 +0000 (16:08 -0700)]
Change-Id: Ib1b6641095d3568e339c1e56a199157d8f25ad84
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/142786
(cherry picked from commit 8de620ebdaf0426bf64db2a0d3feb04f003b11f8)
Signed-off-by: Gaurav Batra <gbatra@nvidia.com>
Reviewed-on: http://git-master/r/146699
Reviewed-by: Automatic_Commit_Validation_User

Rebase-Id: Rc75b6c21137aa26c6bff2848d18b72c99f407b07

arch/arm/mach-tegra/edp.c

index 10c1932..12723ea 100644 (file)
@@ -688,11 +688,20 @@ void __init tegra_init_cpu_edp_limits(unsigned int regulator_mA)
        }
        regulator_cur = regulator_mA + OVERRIDE_DEFAULT;
 
-       if (init_cpu_edp_limits_lookup(cpu_speedo_id) == 0)
-               return;
-
-       if (init_cpu_edp_limits_calculated(cpu_speedo_id) == 0)
-               return;
+       switch (tegra_chip_id) {
+       case TEGRA30:
+               if (init_cpu_edp_limits_lookup(cpu_speedo_id) == 0)
+                       return;
+               break;
+       case TEGRA11X:
+               if (init_cpu_edp_limits_calculated(cpu_speedo_id) == 0)
+                       return;
+               break;
+       case TEGRA20:
+       default:
+               BUG();
+               break;
+       }
 
        edp_limits = edp_default_limits;
        edp_limits_size = ARRAY_SIZE(edp_default_limits);