aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@stericsson.com>2011-11-09 10:55:24 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-03-07 10:09:38 +0100
commit51bf840d7a90df41856ac4afa34e1534e290e633 (patch)
tree75d4f7b05f21777a09d499cca48fa8b4f8d81ca6
parent71038cf2e513615b737df39aba29cbad5ea7caf2 (diff)
mmc: mmci: optimize pre_req if no previous request
Don't prepare DMA in the pre_req hook if there is no previous request. Instead, prepare DMA while start command is being issued. ST-Ericsson Linux next: N/A ST-Ericsson ID: 371812 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I0008b79cbe0e87f830365e689795f344aac3014b Signed-off-by: Per Forlin <per.forlin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36181 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
-rw-r--r--drivers/mmc/host/mmci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 8555965cdec..28b335fbc8c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -591,7 +591,12 @@ static void mmci_pre_request(struct mmc_host *mmc, struct mmc_request *mrq,
if (mmci_validate_data(host, data))
return;
- if (!mmci_dma_prep_next(host, data))
+ /*
+ * Don't prepare DMA if there is no previous request,
+ * is_first_req is set. Instead, prepare DMA while
+ * start command is being issued.
+ */
+ if (!is_first_req && !mmci_dma_prep_next(host, data))
data->host_cookie = ++nd->cookie < 0 ? 1 : nd->cookie;
}