At least the i.MX35 (there may be others) currently implements a quirk to turn of multiblock transfers for the esdhc host. According to the errata this is only true for SD cards and NOT for sdio cards. When the sdio driver initializes the card, it knows the type of card we actually have. So now the sdhci-esdhc-imx could decide based on card type if multiblock transfers should be used or not Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx> --- Changes since v1: - rebased onto mmc-updates-for-3.16-rc1 drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index ccec0e3..2bf9223 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -18,6 +18,7 @@ #include <linux/gpio.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/mmc/card.h> #include <linux/mmc/host.h> #include <linux/mmc/mmc.h> #include <linux/mmc/sdio.h> @@ -880,6 +881,20 @@ static void esdhc_reset(struct sdhci_host *host, u8 mask) sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); } +static void esdhc_init_card_type(struct sdhci_host *host, struct mmc_card *card) +{ + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct pltfm_imx_data *imx_data = pltfm_host->priv; + struct mmc_host *mmc = host->mmc; + + if (imx_data->socdata->flags & ESDHC_FLAG_ENGCM07207) { + if (card->type == MMC_TYPE_SDIO) + mmc->max_blk_count = 65535; + else + mmc->max_blk_count = 1; + } +} + static struct sdhci_ops sdhci_esdhc_ops = { .read_l = esdhc_readl_le, .read_w = esdhc_readw_le, @@ -893,6 +908,7 @@ static struct sdhci_ops sdhci_esdhc_ops = { .set_bus_width = esdhc_pltfm_set_bus_width, .set_uhs_signaling = esdhc_set_uhs_signaling, .reset = esdhc_reset, + .card_type_init = esdhc_init_card_type, }; static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = { -- 2.0.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html