ARM: tegra: power: Correct settings for the BURST_POLICY register
Yudong Tan [Wed, 17 Aug 2011 18:30:00 +0000 (11:30 -0700)]
This is needed to allow clusters come up on CLKM

Bug 862502

Change-Id: I667cccbf6cbc5af0d47ebc07a5c6c83f14a1cc4c
Reviewed-on: http://git-master/r/47584
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Tested-by: Daniel Willemsen <dwillemsen@nvidia.com>

Rebase-Id: R2c7ae1605c0d1561c7fa40f45d09ee073d920497

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

index 487a11f..8cd3901 100644 (file)
@@ -124,7 +124,7 @@ static int cluster_switch_prolog_clock(unsigned int flags)
                if (flags & TEGRA_POWER_SDRAM_SELFREFRESH) {
                        /* In LP1 power mode come up on CLKM (oscillator) */
                        CclkBurstPolicy = readl(CAR_CCLKG_BURST_POLICY);
-                       CclkBurstPolicy |= ~0xF;
+                       CclkBurstPolicy &= ~0xF;
                        SuperCclkDivier = 0;
 
                        writel(CclkBurstPolicy, CAR_CCLKG_BURST_POLICY);
@@ -162,7 +162,7 @@ static int cluster_switch_prolog_clock(unsigned int flags)
                if (flags & TEGRA_POWER_SDRAM_SELFREFRESH) {
                        /* In LP1 power mode come up on CLKM (oscillator) */
                        CclkBurstPolicy = readl(CAR_CCLKLP_BURST_POLICY);
-                       CclkBurstPolicy |= ~0xF;
+                       CclkBurstPolicy &= ~0xF;
                        SuperCclkDivier = 0;
 
                        writel(CclkBurstPolicy, CAR_CCLKLP_BURST_POLICY);
@@ -305,7 +305,7 @@ int tegra_cluster_control(unsigned int us, unsigned int flags)
        if (flags & TEGRA_POWER_CLUSTER_IMMEDIATE)
                us = 0;
 
-       if ((current_cluster != target_cluster) && (!timekeeping_suspended)) {
+       if (current_cluster != target_cluster) {
                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();