ARM: tegra: power: Don't use suspended kernel time
Alex Frid [Wed, 13 Jul 2011 19:56:13 +0000 (12:56 -0700)]
Do not use kernel time to time-stamp Tegra3 CPU ULP/G mode switch in
late suspend/early resume when timekeeping is suspended.

Original-Change-Id: Idb6c8f8c2dd2cfc1e00cec53392de12131d6bbe1
Reviewed-on: http://git-master/r/40958
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Chih-Lung Huang <lhuang@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>

Rebase-Id: R6ce7a5e7e06949f3536524ea675aa9c0fc2ab097

arch/arm/mach-tegra/pm-t3.c

index 1f58917..1156b83 100644 (file)
@@ -306,7 +306,7 @@ int tegra_cluster_control(unsigned int us, unsigned int flags)
        if (flags & TEGRA_POWER_CLUSTER_IMMEDIATE)
                us = 0;
 
-       if (current_cluster != target_cluster) {
+       if ((current_cluster != target_cluster) && (!timekeeping_suspended)) {
                if (target_cluster == TEGRA_POWER_CLUSTER_G) {
                        s64 t = ktime_to_us(ktime_sub(ktime_get(), last_g2lp));
                        s64 t_off = tegra_cpu_power_off_time();