| From efab6d76ebd8fa4c2ca08bb7b0f5905e186892b6 Mon Sep 17 00:00:00 2001 |
| From: Sascha Hauer <s.hauer@pengutronix.de> |
| Date: Fri, 18 Oct 2019 11:39:34 +0200 |
| Subject: [PATCH] mmc: mxs: fix flags passed to dmaengine_prep_slave_sg |
| |
| commit 2bb9f7566ba7ab3c2154964461e37b52cdc6b91b upstream. |
| |
| Since ceeeb99cd821 we no longer abuse the DMA_CTRL_ACK flag for custom |
| driver use and introduced the MXS_DMA_CTRL_WAIT4END instead. We have not |
| changed all users to this flag though. This patch fixes it for the |
| mxs-mmc driver. |
| |
| Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") |
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
| Tested-by: Fabio Estevam <festevam@gmail.com> |
| Reported-by: Bruno Thomsen <bruno.thomsen@gmail.com> |
| Tested-by: Bruno Thomsen <bruno.thomsen@gmail.com> |
| Cc: stable@vger.kernel.org |
| Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c |
| index b334e81c5cab..9a0bc0c5fa4b 100644 |
| --- a/drivers/mmc/host/mxs-mmc.c |
| +++ b/drivers/mmc/host/mxs-mmc.c |
| @@ -17,6 +17,7 @@ |
| #include <linux/interrupt.h> |
| #include <linux/dma-mapping.h> |
| #include <linux/dmaengine.h> |
| +#include <linux/dma/mxs-dma.h> |
| #include <linux/highmem.h> |
| #include <linux/clk.h> |
| #include <linux/err.h> |
| @@ -266,7 +267,7 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host) |
| ssp->ssp_pio_words[2] = cmd1; |
| ssp->dma_dir = DMA_NONE; |
| ssp->slave_dirn = DMA_TRANS_NONE; |
| - desc = mxs_mmc_prep_dma(host, DMA_CTRL_ACK); |
| + desc = mxs_mmc_prep_dma(host, MXS_DMA_CTRL_WAIT4END); |
| if (!desc) |
| goto out; |
| |
| @@ -311,7 +312,7 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host) |
| ssp->ssp_pio_words[2] = cmd1; |
| ssp->dma_dir = DMA_NONE; |
| ssp->slave_dirn = DMA_TRANS_NONE; |
| - desc = mxs_mmc_prep_dma(host, DMA_CTRL_ACK); |
| + desc = mxs_mmc_prep_dma(host, MXS_DMA_CTRL_WAIT4END); |
| if (!desc) |
| goto out; |
| |
| @@ -441,7 +442,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) |
| host->data = data; |
| ssp->dma_dir = dma_data_dir; |
| ssp->slave_dirn = slave_dirn; |
| - desc = mxs_mmc_prep_dma(host, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
| + desc = mxs_mmc_prep_dma(host, DMA_PREP_INTERRUPT | MXS_DMA_CTRL_WAIT4END); |
| if (!desc) |
| goto out; |
| |
| -- |
| 2.7.4 |
| |