mmc: alcor: enable DMA for writes
authorDaniel Drake <drake@endlessm.com>
Tue, 26 Mar 2019 07:04:15 +0000 (15:04 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Apr 2019 09:55:54 +0000 (11:55 +0200)
Enable the DMA codepath for writes as well as reads.
This improves write speed from 1mb/sec to 2mb/sec (tested with dd).

The original ampe_stor vendor driver also uses DMA for writes.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/alcor.c

index 7c8f203f9a24d38bbd1c2b870644e511a1db76d3..3e2efbf3cf8cdef727661b782ef2dda1a3fe4839 100644 (file)
@@ -771,7 +771,8 @@ static void alcor_pre_req(struct mmc_host *mmc,
        data->host_cookie = COOKIE_UNMAPPED;
 
        /* FIXME: looks like the DMA engine works only with CMD18 */
-       if (cmd->opcode != 18)
+       if (cmd->opcode != MMC_READ_MULTIPLE_BLOCK
+                       && cmd->opcode != MMC_WRITE_MULTIPLE_BLOCK)
                return;
        /*
         * We don't do DMA on "complex" transfers, i.e. with