summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSujit Reddy Thumma <sthumma@codeaurora.org>2012-02-04 16:14:50 -0500
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:25:33 -0700
commitaa9dc5064e95c7f7422144d14c8cfd92bb163b37 (patch)
treedaaff5c69ad8b6cd6d5624a7a68a702bdc9a4206 /drivers/mmc
parent357f7f515e66f86627ad7f3dfd04263ebfb775f9 (diff)
mmc: core: sdio: Ensure clocks are always enabled before host interaction
Ensure clocks are always enabled before any interaction with the host controller driver. This makes sure that there is no race between host execution and the core layer turning off clocks in different context with clock gating framework. Change-Id: Ib47d0641f02c4390d26567102ee178beaf63516c Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Per Forlin <per.forlin@stericsson.com> Signed-off-by: Chris Ball <cjb@laptop.org> [sboyd: Keep non-upstreamed bits for sdio.c] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/sdio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 80966a6bf3ae..434d2b7a794f 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -626,8 +626,11 @@ try_again:
/*
* Call the optional HC's init_card function to handle quirks.
*/
- if (host->ops->init_card)
+ if (host->ops->init_card) {
+ mmc_host_clk_hold(host);
host->ops->init_card(host, card);
+ mmc_host_clk_release(host);
+ }
/*
* If the host and card support UHS-I mode request the card