diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_core.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 71e13844df6c..8742e27e4e8b 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c | |||
@@ -641,6 +641,7 @@ int renesas_sdhi_probe(struct platform_device *pdev, | |||
641 | struct renesas_sdhi *priv; | 641 | struct renesas_sdhi *priv; |
642 | struct resource *res; | 642 | struct resource *res; |
643 | int irq, ret, i; | 643 | int irq, ret, i; |
644 | u16 ver; | ||
644 | 645 | ||
645 | of_data = of_device_get_match_data(&pdev->dev); | 646 | of_data = of_device_get_match_data(&pdev->dev); |
646 | 647 | ||
@@ -773,12 +774,17 @@ int renesas_sdhi_probe(struct platform_device *pdev, | |||
773 | if (ret) | 774 | if (ret) |
774 | goto efree; | 775 | goto efree; |
775 | 776 | ||
777 | ver = sd_ctrl_read16(host, CTL_VERSION); | ||
778 | /* GEN2_SDR104 is first known SDHI to use 32bit block count */ | ||
779 | if (ver < SDHI_VER_GEN2_SDR104 && mmc_data->max_blk_count > U16_MAX) | ||
780 | mmc_data->max_blk_count = U16_MAX; | ||
781 | |||
776 | ret = tmio_mmc_host_probe(host); | 782 | ret = tmio_mmc_host_probe(host); |
777 | if (ret < 0) | 783 | if (ret < 0) |
778 | goto edisclk; | 784 | goto edisclk; |
779 | 785 | ||
780 | /* One Gen2 SDHI incarnation does NOT have a CBSY bit */ | 786 | /* One Gen2 SDHI incarnation does NOT have a CBSY bit */ |
781 | if (sd_ctrl_read16(host, CTL_VERSION) == SDHI_VER_GEN2_SDR50) | 787 | if (ver == SDHI_VER_GEN2_SDR50) |
782 | mmc_data->flags &= ~TMIO_MMC_HAVE_CBSY; | 788 | mmc_data->flags &= ~TMIO_MMC_HAVE_CBSY; |
783 | 789 | ||
784 | /* Enable tuning iff we have an SCC and a supported mode */ | 790 | /* Enable tuning iff we have an SCC and a supported mode */ |