Revert "arm: tegra: make sure that the PG request is accepted by PMC"
Bharat Nihalani [Fri, 4 Oct 2013 12:30:36 +0000 (17:30 +0530)]
This reverts commit 7028bfdcaee06241d1691400ccb73afe0a2c659e since it
causes issues with power-gating GPU.

Bug 1382374

Change-Id: I0a67a4c11e99f85164f2dfb1a0065597bbc2a2b2
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/281770
Reviewed-by: Automatic_Commit_Validation_User

arch/arm/mach-tegra/powergate.c

index 69fe1c7..1b88a8f 100644 (file)
@@ -58,7 +58,6 @@ int tegra_powergate_set(int id, bool new_state)
        bool status;
        unsigned long flags;
        spinlock_t *lock;
-       u32 reg;
 
        /* 10us timeout for toggle operation if it takes affect*/
        int toggle_timeout = 10;
@@ -89,38 +88,7 @@ int tegra_powergate_set(int id, bool new_state)
                return 0;
        }
 
-#if !defined(CONFIG_ARCH_TEGRA_3x_SOC)
-       /* Wait if PMC is already processing some other power gating request */
-       do {
-               udelay(1);
-               reg = pmc_read(PWRGATE_TOGGLE);
-               contention_timeout--;
-       } while ((contention_timeout > 0) && (status & PWRGATE_TOGGLE_START));
-
-       if (contention_timeout > 0)
-               pr_err(" Timed out waiting for PMC to submit \
-                               new power gate request \n");
-       contention_timeout = 100;
-#endif
-
-       /* Submit power gate request */
        pmc_write(PWRGATE_TOGGLE_START | id, PWRGATE_TOGGLE);
-
-#if !defined(CONFIG_ARCH_TEGRA_3x_SOC)
-       /* Wait while PMC accepts the request */
-       do {
-               udelay(1);
-               reg = pmc_read(PWRGATE_TOGGLE);
-               contention_timeout--;
-       } while ((contention_timeout > 0) && (status & PWRGATE_TOGGLE_START));
-
-       if (contention_timeout > 0)
-               pr_err(" Timed out waiting for PMC to accept \
-                               new power gate request \n");
-       contention_timeout = 100;
-#endif
-
-       /* Check power gate status */
        do {
                do {
                        udelay(1);