summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-11-04 12:42:43 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 12:40:52 +0100
commit4fb213f81fe51ace7dea7d2f7cc2417fa2a2dd9e (patch)
treec6d5a9bbb6d31ca9a72c77025f85b1fa4336f06f /drivers/mmc/host/sdhci.c
parent76fe379acaeb857f91705f3bd5c6f69ec13872a9 (diff)
mmc: sdhci: Define maximum segments
Define the maximum number of segments instead of having the constant 128 appearing in the code in various places. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 053b55df9df1..586c7391a066 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2877,8 +2877,8 @@ int sdhci_add_host(struct sdhci_host *host)
* descriptor for each segment, plus 1 for a nop end descriptor,
* all multipled by the descriptor size.
*/
- host->adma_table_sz = (128 * 2 + 1) * 8;
- host->align_buffer_sz = 128 * 4;
+ host->adma_table_sz = (SDHCI_MAX_SEGS * 2 + 1) * 8;
+ host->align_buffer_sz = SDHCI_MAX_SEGS * 4;
host->desc_sz = 8;
host->align_sz = 4;
host->align_mask = 3;
@@ -3192,11 +3192,11 @@ int sdhci_add_host(struct sdhci_host *host)
* can do scatter/gather or not.
*/
if (host->flags & SDHCI_USE_ADMA)
- mmc->max_segs = 128;
+ mmc->max_segs = SDHCI_MAX_SEGS;
else if (host->flags & SDHCI_USE_SDMA)
mmc->max_segs = 1;
else /* PIO */
- mmc->max_segs = 128;
+ mmc->max_segs = SDHCI_MAX_SEGS;
/*
* Maximum number of sectors in one transfer. Limited by DMA boundary