提交 58d1246d 编写于 作者: A Adrian Hunter 提交者: Chris Ball

mmc: sdhci: specify maximum discard timeout

In general, SDHC hardware timeout cannot be avoided.
Accordingly, the maximum timeout is specified to limit
the maximum discard size.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 e056a1b5
...@@ -2509,6 +2509,11 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -2509,6 +2509,11 @@ int sdhci_add_host(struct sdhci_host *host)
} else } else
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200; mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
mmc->max_discard_to = (1 << 27) / (mmc->f_max / 1000);
else
mmc->max_discard_to = (1 << 27) / host->timeout_clk;
mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23; mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12) if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册