Commit 4f3d3e9b50931a3ec70f324d53fb7437e2a39388

Authored by Andrei Warkentin
Committed by Chris Ball
1 parent 8edf63710b

mmc: sdhci: Auto-CMD23 fixes.

Fixes bugs in Auto-CMD23 feature enable decision. Auto-CMD23
should be enabled if host is >= v3, and SDMA is not in use.

USE_ADMA | USE_SDMA | Auto-CMD23
---------+----------+-----------
    0    |    0     |     1
---------+----------+-----------
    0    |    1     |     0
---------+----------+-----------
    1    |    0     |     1
---------+----------+-----------
    1    |    1     |     1

Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Chris Ball <cjb@laptop.org>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/mmc/host/sdhci.c
... ... @@ -2494,9 +2494,9 @@
2494 2494 host->flags |= SDHCI_AUTO_CMD12;
2495 2495  
2496 2496 /* Auto-CMD23 stuff only works in ADMA or PIO. */
2497   - if ((host->version == SDHCI_SPEC_300) &&
  2497 + if ((host->version >= SDHCI_SPEC_300) &&
2498 2498 ((host->flags & SDHCI_USE_ADMA) ||
2499   - !(host->flags & SDHCI_REQ_USE_DMA))) {
  2499 + !(host->flags & SDHCI_USE_SDMA))) {
2500 2500 host->flags |= SDHCI_AUTO_CMD23;
2501 2501 DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
2502 2502 } else {