]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sdhci: Add SDHCI_QUIRK_NO_MULTIBLOCK quirk
authorBen Dooks <ben@simtec.co.uk>
Sun, 14 Jun 2009 11:40:53 +0000 (12:40 +0100)
committerPierre Ossman <pierre@ossman.eu>
Sun, 21 Jun 2009 19:00:58 +0000 (21:00 +0200)
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 <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
drivers/mmc/host/sdhci-s3c.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index 19246fe3d3e2209fbb4d280c4822e990c7c4c041..50997d2a63e7effcd533d9d95fea45b9ebf34efc 100644 (file)
@@ -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
index e54d6fba85e16383a7a7ccd633fbb660fedc5aeb..3856669aa7e807211699169f64bd0df74c339d7a 100644 (file)
@@ -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.
index 2de08349c3ca95d0c9ac3fa387574a68b0a41834..84d149096f0e8902e178191dd00204067af973ec 100644 (file)
@@ -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 */