ARM: tegra: dvfs: Update Tegra3 vdd_core floor
Alex Frid [Sun, 8 Jan 2012 04:56:21 +0000 (20:56 -0800)]
To properly account for voltage steps with 12.5mV resolution, moved
up by 25mV all thresholds in vdd_core floor calculation function, and
replaced "less than or equal" comparison with "less than".

Change-Id: I869ecabf4e25a268fbe279e54026d4fd1bf25db6
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/73903
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-on: http://git-master/r/74558
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/tegra3_dvfs.c

index 0e1f108..8bd8bf7 100644 (file)
@@ -69,14 +69,14 @@ static struct dvfs_rail *tegra3_dvfs_rails[] = {
 
 static int tegra3_get_core_floor_mv(int cpu_mv)
 {
-       if (cpu_mv <= 825)
+       if (cpu_mv < 850)
                return 1000;
-       if (cpu_mv <=  975)
+       if (cpu_mv < 1000)
                return 1100;
        if ((tegra_cpu_speedo_id() < 2) ||
            (tegra_cpu_speedo_id() == 4))
                return 1200;
-       if (cpu_mv <= 1075)
+       if (cpu_mv < 1100)
                return 1200;
        if (cpu_mv <= 1250)
                return 1300;