arm: tegra: disa unpowergate update
Bitan Biswas [Mon, 17 Sep 2012 16:03:29 +0000 (21:03 +0530)]
DISA partition unpowergate only needs MIPI-CAL calibration

Reviewed-on: http://git-master/r/133279
(cherry picked from commit acd6d78f9bf50056052f8d636fb8ee2b62c228e6)

Change-Id: Ibfa6e70b92bf7ce70c79cfa670bf39c574163b30
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/143063
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R756ef68a390a316cd4c972d01e3f54e95c767162

arch/arm/mach-tegra/powergate.c

index abefada..4b0aeeb 100644 (file)
@@ -1021,7 +1021,7 @@ static int tegra_powergate_reset_module(int id)
 /*
  * FIXME: sw war for mipi-cal calibration when unpowergating DISA partition
  */
-static void tegra11x_mipical_calibrate(void)
+static void tegra11x_mipical_calibrate(int id)
 {
        struct reg_offset_val {
                u32 offset;
@@ -1054,6 +1054,8 @@ static void tegra11x_mipical_calibrate(void)
        };
        int i;
 
+       if (id != TEGRA_POWERGATE_DISA)
+               return;
        spin_lock_irqsave(&tegra_powergate_lock, flags);
        /* mipi cal por restore */
        for (i = 0; i < ARRAY_SIZE(mipi_cal_por_values); i++) {
@@ -1113,7 +1115,7 @@ int tegra_unpowergate_partition(int id)
        udelay(10);
 
 #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC)
-       tegra11x_mipical_calibrate();
+       tegra11x_mipical_calibrate(id);
 #endif
        powergate_partition_deassert_reset(id);