Commit 1388eefd authored by Ben Dooks's avatar Ben Dooks Committed by Pierre Ossman

sdhci: Add SDHCI_QUIRK_NO_MULTIBLOCK quirk

Add quirk to show the controller cannot do multi-block IO.

This is mainly for the Samsung SDHCI controller that currently
cannot manage to do multi-block PIO without timing out.
Signed-off-by: default avatarBen Dooks <ben@simtec.co.uk>
Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
parent 6882a8c0
...@@ -329,6 +329,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) ...@@ -329,6 +329,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
* support as well. */ * support as well. */
host->quirks |= SDHCI_QUIRK_BROKEN_DMA; host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
/* PIO currently has problems with multi-block IO */
host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
#endif /* CONFIG_MMC_SDHCI_S3C_DMA */ #endif /* CONFIG_MMC_SDHCI_S3C_DMA */
/* It seems we do not get an DATA transfer complete on non-busy /* It seems we do not get an DATA transfer complete on non-busy
......
...@@ -1834,7 +1834,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -1834,7 +1834,7 @@ int sdhci_add_host(struct sdhci_host *host)
/* /*
* Maximum block count. * Maximum block count.
*/ */
mmc->max_blk_count = 65535; mmc->max_blk_count = (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535;
/* /*
* Init tasklets. * Init tasklets.
......
...@@ -226,6 +226,8 @@ struct sdhci_host { ...@@ -226,6 +226,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET (1<<19) #define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET (1<<19)
/* Controller has to be forced to use block size of 2048 bytes */ /* Controller has to be forced to use block size of 2048 bytes */
#define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20)
/* Controller cannot do multi-block transfers */
#define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21)
int irq; /* Device IRQ */ int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */ void __iomem * ioaddr; /* Mapped address */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment