Skip to content

Commit

Permalink
mmc: sdhci: Auto-CMD23 fixes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Warkentin authored and Chris Ball committed May 25, 2011
1 parent 8edf637 commit 4f3d3e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,9 +2494,9 @@ int sdhci_add_host(struct sdhci_host *host)
host->flags |= SDHCI_AUTO_CMD12;

/* Auto-CMD23 stuff only works in ADMA or PIO. */
if ((host->version == SDHCI_SPEC_300) &&
if ((host->version >= SDHCI_SPEC_300) &&
((host->flags & SDHCI_USE_ADMA) ||
!(host->flags & SDHCI_REQ_USE_DMA))) {
!(host->flags & SDHCI_USE_SDMA))) {
host->flags |= SDHCI_AUTO_CMD23;
DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
} else {
Expand Down

0 comments on commit 4f3d3e9

Please sign in to comment.