diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-12-05 12:25:28 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-12 04:14:55 -0500 |
commit | ac00531d9f4be487366573e2bb943e68e9e523ab (patch) | |
tree | 6f618ab9b5033a7b41a3a14440087369eb7bd536 | |
parent | eaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff) |
mmc: sdhci: Tuning should not change max_blk_count
Re-tuning requires that the maximum data length
is limited to 4MiB. The code currently changes
max_blk_count in an attempt to achieve that.
This is wrong because max_blk_count is a different
limit, but it is also un-necessary because
max_req_size is 512KiB anyway. Consequently, the
changes to max_blk_count are removed and the
comment for max_req_size adjusted accordingly.
The comment is also tweaked to show that the 512KiB
limit is a SDMA limit not an ADMA limit.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index cbb245b58538..040158d4fc9a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -259,8 +259,6 @@ static void sdhci_reinit(struct sdhci_host *host) | |||
259 | 259 | ||
260 | del_timer_sync(&host->tuning_timer); | 260 | del_timer_sync(&host->tuning_timer); |
261 | host->flags &= ~SDHCI_NEEDS_RETUNING; | 261 | host->flags &= ~SDHCI_NEEDS_RETUNING; |
262 | host->mmc->max_blk_count = | ||
263 | (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535; | ||
264 | } | 262 | } |
265 | sdhci_enable_card_detection(host); | 263 | sdhci_enable_card_detection(host); |
266 | } | 264 | } |
@@ -2048,8 +2046,6 @@ out: | |||
2048 | host->flags |= SDHCI_USING_RETUNING_TIMER; | 2046 | host->flags |= SDHCI_USING_RETUNING_TIMER; |
2049 | mod_timer(&host->tuning_timer, jiffies + | 2047 | mod_timer(&host->tuning_timer, jiffies + |
2050 | host->tuning_count * HZ); | 2048 | host->tuning_count * HZ); |
2051 | /* Tuning mode 1 limits the maximum data length to 4MB */ | ||
2052 | mmc->max_blk_count = (4 * 1024 * 1024) / mmc->max_blk_size; | ||
2053 | } else if (host->flags & SDHCI_USING_RETUNING_TIMER) { | 2049 | } else if (host->flags & SDHCI_USING_RETUNING_TIMER) { |
2054 | host->flags &= ~SDHCI_NEEDS_RETUNING; | 2050 | host->flags &= ~SDHCI_NEEDS_RETUNING; |
2055 | /* Reload the new initial value for timer */ | 2051 | /* Reload the new initial value for timer */ |
@@ -3260,8 +3256,9 @@ int sdhci_add_host(struct sdhci_host *host) | |||
3260 | mmc->max_segs = SDHCI_MAX_SEGS; | 3256 | mmc->max_segs = SDHCI_MAX_SEGS; |
3261 | 3257 | ||
3262 | /* | 3258 | /* |
3263 | * Maximum number of sectors in one transfer. Limited by DMA boundary | 3259 | * Maximum number of sectors in one transfer. Limited by SDMA boundary |
3264 | * size (512KiB). | 3260 | * size (512KiB). Note some tuning modes impose a 4MiB limit, but this |
3261 | * is less anyway. | ||
3265 | */ | 3262 | */ |
3266 | mmc->max_req_size = 524288; | 3263 | mmc->max_req_size = 524288; |
3267 | 3264 | ||