summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2014-05-28 07:55:43 +0100
committerAndrey Konovalov <andrey.konovalov@linaro.org>2014-07-21 20:12:17 +0400
commit592ccba32c36c1637e49b899332805a990838acf (patch)
treea7fd788b1754be5bc6e47d6d6a1b8c75f331dcb7
parent40b2da1ae2e36c04d5f95083cc65b79e8af9f212 (diff)
downloadlinux-linaro-tracking-592ccba32c36c1637e49b899332805a990838acf.tar.gz
mmc: mmci: Add enough delay between writes to CMD register.
On Qcom SD Card controller POWER, CLKCTRL, DATACTRL and COMMAND registers should be updated in MCLK domain, and writes to these registers must be separated by three MCLK cycles. This resitriction is not applicable for other registers. Any subsequent writes to these register will be ignored until 3 MCLK have passed. One usec delay between two CMD register writes is not sufficient in the card identification phase where the CCLK is very low. This patch replaces a static 1 usec delay to use mmci_reg_delay function which can provide correct delay depending on the cclk frequency. Without this patch the card is not detected. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r--drivers/mmc/host/mmci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index c67120bf2e93..6409f31d328c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -812,7 +812,7 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c)
if (readl(base + MMCICOMMAND) & MCI_CPSM_ENABLE) {
writel(0, base + MMCICOMMAND);
- udelay(1);
+ mmci_reg_delay(host);
}
c |= cmd->opcode | MCI_CPSM_ENABLE;