]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
mmc: sdhci: tegra: disable rtpm at reboot
authorBitan Biswas <bbiswas@nvidia.com>
Mon, 6 Oct 2014 14:01:07 +0000 (19:31 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 19 Feb 2016 19:44:56 +0000 (11:44 -0800)
During Boot stress test, we do not want runtime
callbacks to execute. Hence disable runtime
power management callbacks as part of
Tegra sdhci reboot notifier.

bug 200169886

Change-Id: Idffb8f0794d13c7515d277c9ef29f5eec7490e14
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/553831
Reviewed-on: http://git-master/r/1013282
Reviewed-by: Ian Chang <ianc@nvidia.com>
Tested-by: Ian Chang <ianc@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
drivers/mmc/host/sdhci-tegra.c

index c2be2f258bffb2c86b5048c159d2ac2fe06bb9e3..6eb6009855b14d71cf3f9a4f5889b842e4e397d4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010 Google, Inc.
  *
- * Copyright (c) 2012-2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2016, 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
@@ -4944,6 +4944,7 @@ static int tegra_sdhci_reboot_notify(struct notifier_block *nb,
        struct sdhci_tegra *tegra_host =
                container_of(nb, struct sdhci_tegra, reboot_notify);
        int err;
+       struct sdhci_host *sdhci = dev_get_drvdata(tegra_host->dev);
 
        switch (event) {
        case SYS_RESTART:
@@ -4954,6 +4955,11 @@ static int tegra_sdhci_reboot_notify(struct notifier_block *nb,
                        pr_err("Disable regulator in reboot notify failed %d\n",
                                err);
 
+               /* disable runtime pm callbacks */
+               pr_debug("%s: %s line=%d\n",
+                       mmc_hostname(sdhci->mmc), __func__, __LINE__);
+               sdhci_runtime_forbid(sdhci);
+
                return NOTIFY_OK;
        }
        return NOTIFY_DONE;