arm: tegra: fix clamp status mask
Prashant Gaikwad [Thu, 17 Oct 2013 04:54:03 +0000 (09:54 +0530)]
PCIE and VDE ids are swapped in REMOVE_CLAMPING_COMMAND
but not in CLAMP_STATUS. This results in timeout for
VDE partition.

Bug 1390084

Change-Id: I5d14688f7140d9fc23bb54798147620f631402d1
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/300346
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/powergate.c

index 565da8f..0ec478f 100644 (file)
@@ -362,7 +362,7 @@ int tegra_powergate_remove_clamping(int id)
                udelay(1);
                contention_timeout--;
        } while ((contention_timeout > 0)
-                       && (pmc_read(PWRGATE_CLAMP_STATUS) & mask));
+                       && (pmc_read(PWRGATE_CLAMP_STATUS) & BIT(id)));
 
        WARN(contention_timeout <= 0, "Couldn't remove clamping");