aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mxcmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mxcmmc.c')
-rw-r--r--drivers/mmc/host/mxcmmc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 51e880c8f193..2c53024ee439 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -724,11 +724,27 @@ static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
724 spin_unlock_irqrestore(&host->lock, flags); 724 spin_unlock_irqrestore(&host->lock, flags);
725} 725}
726 726
727static void mxcmci_init_card(struct mmc_host *host, struct mmc_card *card)
728{
729 /*
730 * MX3 SoCs have a silicon bug which corrupts CRC calculation of
731 * multi-block transfers when connected SDIO peripheral doesn't
732 * drive the BUSY line as required by the specs.
733 * One way to prevent this is to only allow 1-bit transfers.
734 */
735
736 if (cpu_is_mx3() && card->type == MMC_TYPE_SDIO)
737 host->caps &= ~MMC_CAP_4_BIT_DATA;
738 else
739 host->caps |= MMC_CAP_4_BIT_DATA;
740}
741
727static const struct mmc_host_ops mxcmci_ops = { 742static const struct mmc_host_ops mxcmci_ops = {
728 .request = mxcmci_request, 743 .request = mxcmci_request,
729 .set_ios = mxcmci_set_ios, 744 .set_ios = mxcmci_set_ios,
730 .get_ro = mxcmci_get_ro, 745 .get_ro = mxcmci_get_ro,
731 .enable_sdio_irq = mxcmci_enable_sdio_irq, 746 .enable_sdio_irq = mxcmci_enable_sdio_irq,
747 .init_card = mxcmci_init_card,
732}; 748};
733 749
734static int mxcmci_probe(struct platform_device *pdev) 750static int mxcmci_probe(struct platform_device *pdev)