diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-of.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c index 128c614d11aa..d79fa55c3b89 100644 --- a/drivers/mmc/host/sdhci-of.c +++ b/drivers/mmc/host/sdhci-of.c | |||
@@ -250,6 +250,9 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev, | |||
250 | host->ops = &sdhci_of_data->ops; | 250 | host->ops = &sdhci_of_data->ops; |
251 | } | 251 | } |
252 | 252 | ||
253 | if (of_get_property(np, "sdhci,1-bit-only", NULL)) | ||
254 | host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; | ||
255 | |||
253 | clk = of_get_property(np, "clock-frequency", &size); | 256 | clk = of_get_property(np, "clock-frequency", &size); |
254 | if (clk && size == sizeof(*clk) && *clk) | 257 | if (clk && size == sizeof(*clk) && *clk) |
255 | of_host->clock = *clk; | 258 | of_host->clock = *clk; |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3856669aa7e8..c7586739be1e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1761,7 +1761,10 @@ int sdhci_add_host(struct sdhci_host *host) | |||
1761 | mmc->ops = &sdhci_ops; | 1761 | mmc->ops = &sdhci_ops; |
1762 | mmc->f_min = host->max_clk / 256; | 1762 | mmc->f_min = host->max_clk / 256; |
1763 | mmc->f_max = host->max_clk; | 1763 | mmc->f_max = host->max_clk; |
1764 | mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; | 1764 | mmc->caps = MMC_CAP_SDIO_IRQ; |
1765 | |||
1766 | if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) | ||
1767 | mmc->caps |= MMC_CAP_4_BIT_DATA; | ||
1765 | 1768 | ||
1766 | if (caps & SDHCI_CAN_DO_HISPD) | 1769 | if (caps & SDHCI_CAN_DO_HISPD) |
1767 | mmc->caps |= MMC_CAP_SD_HIGHSPEED; | 1770 | mmc->caps |= MMC_CAP_SD_HIGHSPEED; |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 84d149096f0e..5d37dd94b53f 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -228,6 +228,8 @@ struct sdhci_host { | |||
228 | #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) | 228 | #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) |
229 | /* Controller cannot do multi-block transfers */ | 229 | /* Controller cannot do multi-block transfers */ |
230 | #define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21) | 230 | #define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21) |
231 | /* Controller can only handle 1-bit data transfers */ | ||
232 | #define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22) | ||
231 | 233 | ||
232 | int irq; /* Device IRQ */ | 234 | int irq; /* Device IRQ */ |
233 | void __iomem * ioaddr; /* Mapped address */ | 235 | void __iomem * ioaddr; /* Mapped address */ |