X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fsdhci.c;h=d27cc9178041e9d686370dac947d6041a509e53f;hp=02b365f5a4bef5acef9dd5aa425e98c1d3af7ea7;hb=70764a905785ebacc8d44fed7a12fba3db267ae6;hpb=dc297c92e6e63af5cbd7e7d2f377247f5664a378 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 02b365f..d27cc91 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -496,12 +496,22 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, WARN_ON((desc - host->adma_desc) > (128 * 2 + 1) * 4); } - /* - * Add a terminating entry. - */ + if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) { + /* + * Mark the last descriptor as the terminating descriptor + */ + if (desc != host->adma_desc) { + desc -= 8; + desc[0] |= 0x2; /* end */ + } + } else { + /* + * Add a terminating entry. + */ - /* nop, end, valid */ - sdhci_set_adma_desc(desc, 0, 0, 0x3); + /* nop, end, valid */ + sdhci_set_adma_desc(desc, 0, 0, 0x3); + } /* * Resync align buffer as we might have changed it.