Revert "arm: tegra: power: disable all sd dpd"
Bitan Biswas [Tue, 24 Jan 2012 07:52:23 +0000 (12:52 +0530)]
This reverts commit 8924926cdb77c6ab270867d4caef7a8cdacd11f2.

Bug 924452
Bug 929628

Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
(cherry picked from commit 142b34993404c853579864f7b7b4f320fb92a715)

Change-Id: I9d49703799e32d410beba18938e94e4b641eea6f
(cherry picked from commit 8de60b7a832bfbbf09e75def756379dbb2d14c3e)
Reviewed-on: http://git-master/r/113387
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wen Yi <wyi@nvidia.com>
Tested-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/pm-t3.c

index a831742..89041c4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Tegra3 SOC-specific power and cluster management
  *
- * Copyright (c) 2009-2012, NVIDIA Corporation.
+ * Copyright (c) 2009-2012, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -450,7 +450,10 @@ void tegra_lp0_cpu_mode(bool enter)
 #define PMC_DPD_SAMPLE                 0x20
 
 struct tegra_io_dpd tegra_list_io_dpd[] = {
-/* Empty DPD list - sd dpd entries removed */
+       /* sd dpd bits in dpd2 register */
+       IO_DPD_INFO("sdhci-tegra.0",    1,      1), /* SDMMC1 */
+       IO_DPD_INFO("sdhci-tegra.2",    1,      2), /* SDMMC3 */
+       IO_DPD_INFO("sdhci-tegra.3",    1,      3), /* SDMMC4 */
 };
 
 struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev)
@@ -481,8 +484,10 @@ void tegra_io_dpd_enable(struct tegra_io_dpd *hnd)
        unsigned int dpd_status;
        unsigned int dpd_enable_lsb;
 
-       if ((!hnd))
+       if ((!hnd)) {
+               pr_warn("SD IO DPD handle NULL in %s\n", __func__);
                return;
+       }
        spin_lock(&tegra_io_dpd_lock);
        dpd_enable_lsb = (hnd->io_dpd_reg_index) ? APBDEV_DPD2_ENABLE_LSB :
                                                APBDEV_DPD_ENABLE_LSB;
@@ -510,8 +515,10 @@ void tegra_io_dpd_disable(struct tegra_io_dpd *hnd)
        unsigned int dpd_status;
        unsigned int dpd_enable_lsb;
 
-       if ((!hnd))
+       if ((!hnd)) {
+               pr_warn("SD IO DPD handle NULL in %s\n", __func__);
                return;
+       }
        spin_lock(&tegra_io_dpd_lock);
        dpd_enable_lsb = (hnd->io_dpd_reg_index) ? APBDEV_DPD2_ENABLE_LSB :
                                                APBDEV_DPD_ENABLE_LSB;