platform: tegra: powergate: disable powergate for SE2 on T214
Krishna Reddy [Tue, 23 May 2017 22:07:29 +0000 (15:07 -0700)]
ISP2 is replaced with SE2 on T214.
Disable powergate for SE2 on T214.

Bug 1811409

Change-Id: I53148f385a6a52b6995ed6d69ee3d0bb165925e5
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1488276
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>

drivers/platform/tegra/powergate/powergate-t21x.c

index 16482f8..7864749 100644 (file)
@@ -617,9 +617,22 @@ static spinlock_t *tegra210_pg_get_lock(void)
 
 static bool tegra210_pg_skip(int id)
 {
+       u32 hid, chipid, major;
+
+       hid = tegra_read_chipid();
+       chipid = tegra_hidrev_get_chipid(hid);
+       major = tegra_hidrev_get_majorrev(hid);
+
        switch (t210_pg_info[id].part_id) {
        case TEGRA210_POWER_DOMAIN_GPU:
                return true;
+       case TEGRA210_POWER_DOMAIN_VENC:
+       case TEGRA210_POWER_DOMAIN_VE2:
+               /* T214 has SE2 in place of ISP2 and powergate
+                * is not supported for SE2.
+                */
+               if (chipid == TEGRA210B01 && major >= 2)
+                       return true;
        default:
                return false;
        }