diff options
Diffstat (limited to 'drivers/mmc/host/sunxi-mmc.c')
| -rw-r--r-- | drivers/mmc/host/sunxi-mmc.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 279e326e397e..70fadc976795 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c | |||
| @@ -1399,13 +1399,37 @@ static int sunxi_mmc_probe(struct platform_device *pdev) | |||
| 1399 | mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | 1399 | mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | |
| 1400 | MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ; | 1400 | MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ; |
| 1401 | 1401 | ||
| 1402 | if (host->cfg->clk_delays || host->use_new_timings) | 1402 | /* |
| 1403 | * Some H5 devices do not have signal traces precise enough to | ||
| 1404 | * use HS DDR mode for their eMMC chips. | ||
| 1405 | * | ||
| 1406 | * We still enable HS DDR modes for all the other controller | ||
| 1407 | * variants that support them. | ||
| 1408 | */ | ||
| 1409 | if ((host->cfg->clk_delays || host->use_new_timings) && | ||
| 1410 | !of_device_is_compatible(pdev->dev.of_node, | ||
| 1411 | "allwinner,sun50i-h5-emmc")) | ||
| 1403 | mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR; | 1412 | mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR; |
| 1404 | 1413 | ||
| 1405 | ret = mmc_of_parse(mmc); | 1414 | ret = mmc_of_parse(mmc); |
| 1406 | if (ret) | 1415 | if (ret) |
| 1407 | goto error_free_dma; | 1416 | goto error_free_dma; |
| 1408 | 1417 | ||
| 1418 | /* | ||
| 1419 | * If we don't support delay chains in the SoC, we can't use any | ||
| 1420 | * of the higher speed modes. Mask them out in case the device | ||
| 1421 | * tree specifies the properties for them, which gets added to | ||
| 1422 | * the caps by mmc_of_parse() above. | ||
| 1423 | */ | ||
| 1424 | if (!(host->cfg->clk_delays || host->use_new_timings)) { | ||
| 1425 | mmc->caps &= ~(MMC_CAP_3_3V_DDR | MMC_CAP_1_8V_DDR | | ||
| 1426 | MMC_CAP_1_2V_DDR | MMC_CAP_UHS); | ||
| 1427 | mmc->caps2 &= ~MMC_CAP2_HS200; | ||
| 1428 | } | ||
| 1429 | |||
| 1430 | /* TODO: This driver doesn't support HS400 mode yet */ | ||
| 1431 | mmc->caps2 &= ~MMC_CAP2_HS400; | ||
| 1432 | |||
| 1409 | ret = sunxi_mmc_init_host(host); | 1433 | ret = sunxi_mmc_init_host(host); |
| 1410 | if (ret) | 1434 | if (ret) |
| 1411 | goto error_free_dma; | 1435 | goto error_free_dma; |
