diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2012-02-07 21:02:47 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-09 16:05:26 -0800 |
commit | 90c7ef70d1cd95d73d8e860209b06b1d0bae2c2f (patch) | |
tree | 7bdb11bac85880abc365cdd1e701b7e011cf3d09 /drivers/mmc | |
parent | faaa975f6ff8719b2f1f2d3fa7bd69066362a171 (diff) |
mmc: sdhci: quirk for not calculate max_discard_to
Adding SDHCI_QUIRK_NO_CALC_MAX_DISCARD_TO for not to calculate
max_discard_to which is deviation in setting max_discard.
For some host controllers, combination of
1) calculated non-zero value of max_discard_to and
2) erase_group_def not set
can result into setting max_discard value to pref_erase in
sectors which is very less, so it takes long time for erase.
With this change host controller can specify to calculate
max_discard_to and based on that max_discard value will be set.
bug 930767
Change-Id: I2c64ef8a6821620f2a65c06e25d2af68e3554a75
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/79839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index b1dd628ac648..50a268ea26d5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2589,7 +2589,8 @@ int sdhci_add_host(struct sdhci_host *host) if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) host->timeout_clk = mmc->f_max / 1000; - mmc->max_discard_to = (1 << 27) / host->timeout_clk; + if (!(host->quirks & SDHCI_QUIRK_NO_CALC_MAX_DISCARD_TO)) + mmc->max_discard_to = (1 << 27) / host->timeout_clk; if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12) host->flags |= SDHCI_AUTO_CMD12; |