Skip to content

Commit

Permalink
sdhci: Add SDHCI_QUIRK_NO_MULTIBLOCK quirk
Browse files Browse the repository at this point in the history
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: Ben Dooks <[email protected]>
Signed-off-by: Pierre Ossman <[email protected]>
  • Loading branch information
Ben Dooks authored and ossman committed Jun 21, 2009
1 parent 6882a8c commit 1388eef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/mmc/host/sdhci-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
* support as well. */
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 */

/* It seems we do not get an DATA transfer complete on non-busy
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ int sdhci_add_host(struct sdhci_host *host)
/*
* Maximum block count.
*/
mmc->max_blk_count = 65535;
mmc->max_blk_count = (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535;

/*
* Init tasklets.
Expand Down
2 changes: 2 additions & 0 deletions drivers/mmc/host/sdhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET (1<<19)
/* Controller has to be forced to use block size of 2048 bytes */
#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 */
void __iomem * ioaddr; /* Mapped address */
Expand Down

0 comments on commit 1388eef

Please sign in to comment.