diff options
author | Per Forlin <per.forlin@stericsson.com> | 2011-11-09 10:55:24 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:02 +0200 |
commit | 4920bb837ad14634b8d8b257452442ac5d97a82f (patch) | |
tree | 6b4e0f858d28051670e40a7c7e7c784377b8a614 | |
parent | 0ffd7158af8a87c04eb65c32b4b7008318e8fbea (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2d3d16183c1..e3d67089265 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -593,7 +593,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; } |