diff options
author | Simon Glass <sjg@chromium.org> | 2011-09-15 10:48:16 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-09-15 12:08:16 -0700 |
commit | a203fc396572861bdc5a410bd2a719ab84c7429a (patch) | |
tree | 19a6ee5ab81d077df6b1cc6e3c1efccb7e182cfe /drivers/mmc | |
parent | aa0cb686741978c62ecc689e9f89dbd138fee91e (diff) |
mmc: tidy up mmc now that we are closer to upstream
I have cherry-picked a few commits which fix bugs in mmc with high capacity
devices. So we can revert most of our required changes here. This sorts out
remaining unreliability with mmc by increasing the timeout further.
BUG=chromium-os:20468
TEST=build and boot on seaboard
Change-Id: Ic9ceeadf226b37a05041f4dbcfcb9f285b831cab
Reviewed-on: http://gerrit.chromium.org/gerrit/7793
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 6499836ea20..5ea693818c8 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -425,13 +425,7 @@ sd_send_op_cond(struct mmc *mmc) int mmc_send_op_cond(struct mmc *mmc) { -#define EMMC_FIX - -#ifdef EMMC_FIX - int timeout = 100; -#else - int timeout = 10; -#endif + int timeout = 1000; struct mmc_cmd cmd; uint start; int err; @@ -450,19 +444,14 @@ int mmc_send_op_cond(struct mmc *mmc) if (err) return err; - udelay(1000); start = get_timer(0); do { cmd.cmdidx = MMC_CMD_SEND_OP_COND; cmd.resp_type = MMC_RSP_R3; -#ifdef EMMC_FIX - cmd.cmdarg = OCR_HCS | mmc->voltages; -#else cmd.cmdarg = (mmc_host_is_spi(mmc) ? 0 : (mmc->voltages & (cmd.response[0] & OCR_VOLTAGE_MASK)) | (cmd.response[0] & OCR_ACCESS_MODE)); -#endif if (mmc->host_caps & MMC_MODE_HC) cmd.cmdarg |= OCR_HCS; |