mmc: sdhci-msm: use max discard size supported for mmc queue
With newer mmc drivers, max_discard_to has been remvoed from the sdhci driver. So instead of incorrectly using max_busy_timeout for calculating max_discard to be used by mmc queue, use the mmc cap to indicate that the max discard should be used for msm sdhci driver. Change-Id: I424cd0a5ee9ffd7199be58a5a091984c5fcda52f Signed-off-by: Krishna Konda <kkonda@codeaurora.org> [subhashj@codeaurora.org: fixed merge conflicts] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
parent
6d9a04f1b1
commit
d2cd07bae2
3 changed files with 4 additions and 14 deletions
|
@ -4032,7 +4032,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
host->quirks |= SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;
|
||||
host->quirks |= SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC;
|
||||
host->quirks2 |= SDHCI_QUIRK2_ALWAYS_USE_BASE_CLOCK;
|
||||
host->quirks2 |= SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE;
|
||||
host->quirks2 |= SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD;
|
||||
host->quirks2 |= SDHCI_QUIRK2_BROKEN_PRESET_VALUE;
|
||||
host->quirks2 |= SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT;
|
||||
|
@ -4094,6 +4093,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
msm_host->mmc->caps2 |= MMC_CAP2_HS400_POST_TUNING;
|
||||
msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE;
|
||||
msm_host->mmc->caps2 |= MMC_CAP2_SANITIZE;
|
||||
msm_host->mmc->caps2 |= MMC_CAP2_MAX_DISCARD_SIZE;
|
||||
|
||||
if (msm_host->pdata->nonremovable)
|
||||
msm_host->mmc->caps |= MMC_CAP_NONREMOVABLE;
|
||||
|
|
|
@ -3791,10 +3791,6 @@ int sdhci_add_host(struct sdhci_host *host)
|
|||
if (override_timeout_clk)
|
||||
host->timeout_clk = override_timeout_clk;
|
||||
|
||||
|
||||
if (!(host->quirks2 & SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE))
|
||||
mmc->max_busy_timeout = (1 << 27) / host->timeout_clk;
|
||||
|
||||
mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
|
||||
mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
|
||||
|
||||
|
|
|
@ -452,12 +452,6 @@ struct sdhci_host {
|
|||
* required frequency.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_ALWAYS_USE_BASE_CLOCK (1<<19)
|
||||
/*
|
||||
* Dont use the max_discard_to in sdhci driver so that the maximum discard
|
||||
* unit gets picked by the mmc queue. Otherwise, it takes a long time for
|
||||
* secure discard kind of operations to complete.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE (1<<20)
|
||||
|
||||
/*
|
||||
* Ignore data timeout error for R1B commands as there will be no
|
||||
|
@ -465,20 +459,20 @@ struct sdhci_host {
|
|||
* could be lager than the maximum timeout value that controller
|
||||
* can handle.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD (1<<21)
|
||||
#define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD (1<<20)
|
||||
|
||||
/*
|
||||
* The preset value registers are not properly initialized by
|
||||
* some hardware and hence preset value must not be enabled for
|
||||
* such controllers.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_BROKEN_PRESET_VALUE (1<<22)
|
||||
#define SDHCI_QUIRK2_BROKEN_PRESET_VALUE (1<<21)
|
||||
/*
|
||||
* Some controllers define the usage of 0xF in data timeout counter
|
||||
* register (0x2E) which is actually a reserved bit as per
|
||||
* specification.
|
||||
*/
|
||||
#define SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT (1<<23)
|
||||
#define SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT (1<<22)
|
||||
/*
|
||||
* This is applicable for controllers that advertize timeout clock
|
||||
* value in capabilities register (bit 5-0) as just 50MHz whereas the
|
||||
|
|
Loading…
Add table
Reference in a new issue