mmc: s3c6410: add new quirk in sdhci driver and update ADMA descriptor build
The s3c6410 sdhci controller does not support the 'End' attribute and NOP attribute in the same 8-Byte ADMA descriptor. This patch adds a new quirk to identify sdhci host contollers with such behaviour. In addition to this, for controllers using the new quirk, the last entry in the ADMA descritor table is marked with the 'End' attribute (instead of using a NOP descriptor with 'End' attribute). Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
dc297c92e6
commit
70764a9057
2 changed files with 17 additions and 5 deletions
|
@ -496,12 +496,22 @@ static int sdhci_adma_table_pre(struct sdhci_host *host,
|
||||||
WARN_ON((desc - host->adma_desc) > (128 * 2 + 1) * 4);
|
WARN_ON((desc - host->adma_desc) > (128 * 2 + 1) * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (host->quirks & SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC) {
|
||||||
* Add a terminating entry.
|
/*
|
||||||
*/
|
* 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 */
|
/* nop, end, valid */
|
||||||
sdhci_set_adma_desc(desc, 0, 0, 0x3);
|
sdhci_set_adma_desc(desc, 0, 0, 0x3);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resync align buffer as we might have changed it.
|
* Resync align buffer as we might have changed it.
|
||||||
|
|
|
@ -238,6 +238,8 @@ struct sdhci_host {
|
||||||
#define SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK (1<<24)
|
#define SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK (1<<24)
|
||||||
/* Controller reports wrong base clock capability */
|
/* Controller reports wrong base clock capability */
|
||||||
#define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN (1<<25)
|
#define SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN (1<<25)
|
||||||
|
/* Controller cannot support End Attribute in NOP ADMA descriptor */
|
||||||
|
#define SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC (1<<26)
|
||||||
|
|
||||||
int irq; /* Device IRQ */
|
int irq; /* Device IRQ */
|
||||||
void __iomem * ioaddr; /* Mapped address */
|
void __iomem * ioaddr; /* Mapped address */
|
||||||
|
|
Loading…
Reference in a new issue