summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorBitan Biswas <bbiswas@nvidia.com>2014-04-28 18:51:10 +0530
committerMandar Padmawar <mpadmawar@nvidia.com>2014-05-02 04:34:46 -0700
commitfafb93e24260bf4615d1cfacea8ba6d926b8a221 (patch)
tree22f3e6cf6e518641daa9a3ba3bccddf72a33943c /drivers/mmc
parentd380528e5e865437681c21befc40de430b39f9a9 (diff)
mmc: core: power up post sdio attach error
During mmc rescan the attach sdio call could fail. The sdio host clocks are turned Off as part of error handling. Use power up to turn clock ON. power down call is needed since subsequent calls in consecutive power up return immediately. bug 1456241 bug 200000303 Change-Id: I6c412ded8e15bc07af93750cb25ac71fee483021 Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/402435/ Reviewed-on: http://git-master/r/402969/ Reviewed-on: http://git-master/r/402980 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 7381b9cdd60b..889c0db96357 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -5,7 +5,7 @@
* SD support Copyright (C) 2004 Ian Molton, All Rights Reserved.
* Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved.
* MMCv4 support Copyright (C) 2006 Philip Langdale, All Rights Reserved.
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012-2014, 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 version 2 as
@@ -2353,8 +2353,14 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
mmc_send_if_cond(host, host->ocr_avail);
/* Order's important: probe SDIO, then SD, then MMC */
- if (!mmc_attach_sdio(host))
+ if (!mmc_attach_sdio(host)) {
return 0;
+ } else {
+ /* error in attach sdio disables clock */
+ mmc_power_off(host);
+ mmc_power_up(host);
+ }
+
if (!mmc_attach_sd(host))
return 0;
if (!mmc_attach_mmc(host))