video: tegra: camera: do not powergate DISA on T30
Naveen Kumar S [Thu, 30 May 2013 09:14:02 +0000 (14:14 +0530)]
Added conditional check to determine that the SoC is not T20 or T30
while powergating DISA partition as this partition is not present
in these SoCs.

Bug 1289935

Change-Id: I13b9eb84edf4c2a9fed27905f245f0be5d7da365
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/234054
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

drivers/video/tegra/camera/camera_power.c

index 554d2ec..b5a3e0c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * drivers/video/tegra/camera/camera_power.c
  *
- * Copyright (C) 2013 Nvidia Corp
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -35,12 +35,13 @@ int tegra_camera_power_on(struct tegra_camera *camera)
        /* Powergating DIS must powergate VE partition. Camera
         * module needs to increase the ref-count of disa to
         * avoid itself powergated by DIS inadvertently. */
+#ifndef CONFIG_ARCH_TEGRA_3x_SOC
        ret = tegra_unpowergate_partition(TEGRA_POWERGATE_DISA);
        if (ret)
                dev_err(camera->dev,
                        "%s: DIS unpowergate failed.\n",
                        __func__);
-
+#endif
        /* Unpowergate VE */
        ret = tegra_unpowergate_partition(TEGRA_POWERGATE_VENC);
        if (ret)
@@ -66,12 +67,14 @@ int tegra_camera_power_off(struct tegra_camera *camera)
                        "%s: VENC powergate failed.\n",
                        __func__);
 
+#ifndef CONFIG_ARCH_TEGRA_3x_SOC
        ret = tegra_powergate_partition(TEGRA_POWERGATE_DISA);
        if (ret)
                dev_err(camera->dev,
                        "%s: DIS powergate failed.\n",
                        __func__);
 #endif
+#endif
        /* Disable external power */
        if (camera->reg) {
                ret = regulator_disable(camera->reg);