linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: tmio: simplify the DMA mode test
@ 2018-10-12 15:03 Masahiro Yamada
  2018-10-14 22:36 ` Wolfram Sang
  2018-10-15 13:15 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-10-12 15:03 UTC (permalink / raw)
  To: linux-mmc, Wolfram Sang
  Cc: Ulf Hansson, linux-renesas-soc, Masahiro Yamada, linux-kernel,
	linux-arm-kernel

host->chan_{rx,tx} represents the DMA capability of the platform.
Even if DMA is supported, there are cases where we want to use PIO,
for example, data length is short enough as commit 5f52c3552946
("mmc: tmio: use PIO for short transfers") mentioned.

Regarding the hardware control flow, we are interested in whether DMA
is currently enabled or not, instead of whether the platform has the
DMA capability.

Hence, the several conditionals in tmio_mmc_core.c end up with
checking host->chan_{rx,tx} and !host->force_pio. This is not nice.

Let's flip the flag host->force_pio into host->dma_on.

host->dma_on represents whether the DMA is currently enabled or not.
This flag is set false in the beginning of each command, then should
be set true by tmio_mmc_start_dma() when the DMA is turned on.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/mmc/host/renesas_sdhi_internal_dmac.c |  3 ++-
 drivers/mmc/host/renesas_sdhi_sys_dmac.c      | 10 ++++------
 drivers/mmc/host/tmio_mmc.h                   |  2 +-
 drivers/mmc/host/tmio_mmc_core.c              | 14 +++++++-------
 drivers/mmc/host/uniphier-sd.c                |  6 ++++--
 5 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index ca0b439..885676b 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -201,13 +201,14 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
 	renesas_sdhi_internal_dmac_dm_write(host, DM_DTRAN_ADDR,
 					    sg_dma_address(sg));
 
+	host->dma_on = true;
+
 	return;
 
 force_pio_with_unmap:
 	dma_unmap_sg(&host->pdev->dev, sg, host->sg_len, mmc_get_dma_dir(data));
 
 force_pio:
-	host->force_pio = true;
 	renesas_sdhi_internal_dmac_enable_dma(host, false);
 }
 
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index 5389c48..3c97831 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -213,10 +213,8 @@ static void renesas_sdhi_sys_dmac_start_dma_rx(struct tmio_mmc_host *host)
 		goto pio;
 	}
 
-	if (sg->length < TMIO_MMC_MIN_DMA_LEN) {
-		host->force_pio = true;
+	if (sg->length < TMIO_MMC_MIN_DMA_LEN)
 		return;
-	}
 
 	/* The only sg element can be unaligned, use our bounce buffer then */
 	if (!aligned) {
@@ -240,6 +238,7 @@ static void renesas_sdhi_sys_dmac_start_dma_rx(struct tmio_mmc_host *host)
 			desc = NULL;
 			ret = cookie;
 		}
+		host->dma_on = true;
 	}
 pio:
 	if (!desc) {
@@ -286,10 +285,8 @@ static void renesas_sdhi_sys_dmac_start_dma_tx(struct tmio_mmc_host *host)
 		goto pio;
 	}
 
-	if (sg->length < TMIO_MMC_MIN_DMA_LEN) {
-		host->force_pio = true;
+	if (sg->length < TMIO_MMC_MIN_DMA_LEN)
 		return;
-	}
 
 	/* The only sg element can be unaligned, use our bounce buffer then */
 	if (!aligned) {
@@ -318,6 +315,7 @@ static void renesas_sdhi_sys_dmac_start_dma_tx(struct tmio_mmc_host *host)
 			desc = NULL;
 			ret = cookie;
 		}
+		host->dma_on = true;
 	}
 pio:
 	if (!desc) {
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 18b4308..1c3bdad 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -142,7 +142,7 @@ struct tmio_mmc_host {
 	struct tmio_mmc_data *pdata;
 
 	/* DMA support */
-	bool			force_pio;
+	bool			dma_on;
 	struct dma_chan		*chan_rx;
 	struct dma_chan		*chan_tx;
 	struct tasklet_struct	dma_issue;
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index a571106..38be3fc 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -364,7 +364,7 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
 	unsigned int count;
 	unsigned long flags;
 
-	if ((host->chan_tx || host->chan_rx) && !host->force_pio) {
+	if (host->dma_on) {
 		pr_err("PIO IRQ in DMA mode!\n");
 		return;
 	} else if (!data) {
@@ -436,7 +436,7 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host)
 	 */
 
 	if (data->flags & MMC_DATA_READ) {
-		if (host->chan_rx && !host->force_pio)
+		if (host->dma_on)
 			tmio_mmc_check_bounce_buffer(host);
 		dev_dbg(&host->pdev->dev, "Complete Rx request %p\n",
 			host->mrq);
@@ -473,7 +473,7 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host, unsigned int stat)
 	if (stat & TMIO_STAT_CRCFAIL || stat & TMIO_STAT_STOPBIT_ERR ||
 	    stat & TMIO_STAT_TXUNDERRUN)
 		data->error = -EILSEQ;
-	if (host->chan_tx && (data->flags & MMC_DATA_WRITE) && !host->force_pio) {
+	if (host->dma_on && (data->flags & MMC_DATA_WRITE)) {
 		u32 status = sd_ctrl_read16_and_16_as_32(host, CTL_STATUS);
 		bool done = false;
 
@@ -497,7 +497,7 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host, unsigned int stat)
 			tmio_mmc_disable_mmc_irqs(host, TMIO_STAT_DATAEND);
 			tmio_mmc_dataend_dma(host);
 		}
-	} else if (host->chan_rx && (data->flags & MMC_DATA_READ) && !host->force_pio) {
+	} else if (host->dma_on && (data->flags & MMC_DATA_READ)) {
 		tmio_mmc_disable_mmc_irqs(host, TMIO_STAT_DATAEND);
 		tmio_mmc_dataend_dma(host);
 	} else {
@@ -550,7 +550,7 @@ static void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat)
 	 */
 	if (host->data && (!cmd->error || cmd->error == -EILSEQ)) {
 		if (host->data->flags & MMC_DATA_READ) {
-			if (host->force_pio || !host->chan_rx) {
+			if (!host->dma_on) {
 				tmio_mmc_enable_mmc_irqs(host, TMIO_MASK_READOP);
 			} else {
 				tmio_mmc_disable_mmc_irqs(host,
@@ -558,7 +558,7 @@ static void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat)
 				tasklet_schedule(&host->dma_issue);
 			}
 		} else {
-			if (host->force_pio || !host->chan_tx) {
+			if (!host->dma_on) {
 				tmio_mmc_enable_mmc_irqs(host, TMIO_MASK_WRITEOP);
 			} else {
 				tmio_mmc_disable_mmc_irqs(host,
@@ -688,7 +688,7 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
 
 	tmio_mmc_init_sg(host, data);
 	host->data = data;
-	host->force_pio = false;
+	host->dma_on = false;
 
 	/* Set transfer length / blocksize */
 	sd_ctrl_write16(host, CTL_SD_XFER_LEN, data->blksz);
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 1ee9fd0..91a2be4 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -157,13 +157,14 @@ static void uniphier_sd_external_dma_start(struct tmio_mmc_host *host,
 	if (cookie < 0)
 		goto unmap_sg;
 
+	host->dma_on = true;
+
 	return;
 
 unmap_sg:
 	dma_unmap_sg(mmc_dev(host->mmc), host->sg_ptr, host->sg_len,
 		     priv->dma_dir);
 force_pio:
-	host->force_pio = true;
 	uniphier_sd_dma_endisable(host, 0);
 }
 
@@ -283,9 +284,10 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host,
 	writel(lower_32_bits(dma_addr), host->ctl + UNIPHIER_SD_DMA_ADDR_L);
 	writel(upper_32_bits(dma_addr), host->ctl + UNIPHIER_SD_DMA_ADDR_H);
 
+	host->dma_on = true;
+
 	return;
 force_pio:
-	host->force_pio = true;
 	uniphier_sd_dma_endisable(host, 0);
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: tmio: simplify the DMA mode test
  2018-10-12 15:03 [PATCH] mmc: tmio: simplify the DMA mode test Masahiro Yamada
@ 2018-10-14 22:36 ` Wolfram Sang
  2018-10-15 11:33   ` Wolfram Sang
  2018-10-15 13:15 ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2018-10-14 22:36 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-mmc, Wolfram Sang, Ulf Hansson, linux-renesas-soc,
	linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

On Sat, Oct 13, 2018 at 12:03:08AM +0900, Masahiro Yamada wrote:
> host->chan_{rx,tx} represents the DMA capability of the platform.
> Even if DMA is supported, there are cases where we want to use PIO,
> for example, data length is short enough as commit 5f52c3552946
> ("mmc: tmio: use PIO for short transfers") mentioned.
> 
> Regarding the hardware control flow, we are interested in whether DMA
> is currently enabled or not, instead of whether the platform has the
> DMA capability.
> 
> Hence, the several conditionals in tmio_mmc_core.c end up with
> checking host->chan_{rx,tx} and !host->force_pio. This is not nice.
> 
> Let's flip the flag host->force_pio into host->dma_on.
> 
> host->dma_on represents whether the DMA is currently enabled or not.
> This flag is set false in the beginning of each command, then should
> be set true by tmio_mmc_start_dma() when the DMA is turned on.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

I like it. Much easier to read!

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Also here, I'd like to test this on Monday on some more devices.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: tmio: simplify the DMA mode test
  2018-10-14 22:36 ` Wolfram Sang
@ 2018-10-15 11:33   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-10-15 11:33 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-mmc, Wolfram Sang, Ulf Hansson, linux-renesas-soc,
	linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

On Mon, Oct 15, 2018 at 12:36:36AM +0200, Wolfram Sang wrote:
> On Sat, Oct 13, 2018 at 12:03:08AM +0900, Masahiro Yamada wrote:
> > host->chan_{rx,tx} represents the DMA capability of the platform.
> > Even if DMA is supported, there are cases where we want to use PIO,
> > for example, data length is short enough as commit 5f52c3552946
> > ("mmc: tmio: use PIO for short transfers") mentioned.
> > 
> > Regarding the hardware control flow, we are interested in whether DMA
> > is currently enabled or not, instead of whether the platform has the
> > DMA capability.
> > 
> > Hence, the several conditionals in tmio_mmc_core.c end up with
> > checking host->chan_{rx,tx} and !host->force_pio. This is not nice.
> > 
> > Let's flip the flag host->force_pio into host->dma_on.
> > 
> > host->dma_on represents whether the DMA is currently enabled or not.
> > This flag is set false in the beginning of each command, then should
> > be set true by tmio_mmc_start_dma() when the DMA is turned on.
> > 
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> 
> I like it. Much easier to read!
> 
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Tested on R-Car H3 ES1.0 and ES2.0, M3N, and H2. No regressions,
especially no performance regressions (since "when to enable DMA" code
was refactored).

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: tmio: simplify the DMA mode test
  2018-10-12 15:03 [PATCH] mmc: tmio: simplify the DMA mode test Masahiro Yamada
  2018-10-14 22:36 ` Wolfram Sang
@ 2018-10-15 13:15 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2018-10-15 13:15 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-mmc, Wolfram Sang, Linux-Renesas,
	Linux Kernel Mailing List, Linux ARM

On 12 October 2018 at 17:03, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> host->chan_{rx,tx} represents the DMA capability of the platform.
> Even if DMA is supported, there are cases where we want to use PIO,
> for example, data length is short enough as commit 5f52c3552946
> ("mmc: tmio: use PIO for short transfers") mentioned.
>
> Regarding the hardware control flow, we are interested in whether DMA
> is currently enabled or not, instead of whether the platform has the
> DMA capability.
>
> Hence, the several conditionals in tmio_mmc_core.c end up with
> checking host->chan_{rx,tx} and !host->force_pio. This is not nice.
>
> Let's flip the flag host->force_pio into host->dma_on.
>
> host->dma_on represents whether the DMA is currently enabled or not.
> This flag is set false in the beginning of each command, then should
> be set true by tmio_mmc_start_dma() when the DMA is turned on.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c |  3 ++-
>  drivers/mmc/host/renesas_sdhi_sys_dmac.c      | 10 ++++------
>  drivers/mmc/host/tmio_mmc.h                   |  2 +-
>  drivers/mmc/host/tmio_mmc_core.c              | 14 +++++++-------
>  drivers/mmc/host/uniphier-sd.c                |  6 ++++--
>  5 files changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index ca0b439..885676b 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -201,13 +201,14 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
>         renesas_sdhi_internal_dmac_dm_write(host, DM_DTRAN_ADDR,
>                                             sg_dma_address(sg));
>
> +       host->dma_on = true;
> +
>         return;
>
>  force_pio_with_unmap:
>         dma_unmap_sg(&host->pdev->dev, sg, host->sg_len, mmc_get_dma_dir(data));
>
>  force_pio:
> -       host->force_pio = true;
>         renesas_sdhi_internal_dmac_enable_dma(host, false);
>  }
>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index 5389c48..3c97831 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -213,10 +213,8 @@ static void renesas_sdhi_sys_dmac_start_dma_rx(struct tmio_mmc_host *host)
>                 goto pio;
>         }
>
> -       if (sg->length < TMIO_MMC_MIN_DMA_LEN) {
> -               host->force_pio = true;
> +       if (sg->length < TMIO_MMC_MIN_DMA_LEN)
>                 return;
> -       }
>
>         /* The only sg element can be unaligned, use our bounce buffer then */
>         if (!aligned) {
> @@ -240,6 +238,7 @@ static void renesas_sdhi_sys_dmac_start_dma_rx(struct tmio_mmc_host *host)
>                         desc = NULL;
>                         ret = cookie;
>                 }
> +               host->dma_on = true;
>         }
>  pio:
>         if (!desc) {
> @@ -286,10 +285,8 @@ static void renesas_sdhi_sys_dmac_start_dma_tx(struct tmio_mmc_host *host)
>                 goto pio;
>         }
>
> -       if (sg->length < TMIO_MMC_MIN_DMA_LEN) {
> -               host->force_pio = true;
> +       if (sg->length < TMIO_MMC_MIN_DMA_LEN)
>                 return;
> -       }
>
>         /* The only sg element can be unaligned, use our bounce buffer then */
>         if (!aligned) {
> @@ -318,6 +315,7 @@ static void renesas_sdhi_sys_dmac_start_dma_tx(struct tmio_mmc_host *host)
>                         desc = NULL;
>                         ret = cookie;
>                 }
> +               host->dma_on = true;
>         }
>  pio:
>         if (!desc) {
> diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
> index 18b4308..1c3bdad 100644
> --- a/drivers/mmc/host/tmio_mmc.h
> +++ b/drivers/mmc/host/tmio_mmc.h
> @@ -142,7 +142,7 @@ struct tmio_mmc_host {
>         struct tmio_mmc_data *pdata;
>
>         /* DMA support */
> -       bool                    force_pio;
> +       bool                    dma_on;
>         struct dma_chan         *chan_rx;
>         struct dma_chan         *chan_tx;
>         struct tasklet_struct   dma_issue;
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index a571106..38be3fc 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -364,7 +364,7 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
>         unsigned int count;
>         unsigned long flags;
>
> -       if ((host->chan_tx || host->chan_rx) && !host->force_pio) {
> +       if (host->dma_on) {
>                 pr_err("PIO IRQ in DMA mode!\n");
>                 return;
>         } else if (!data) {
> @@ -436,7 +436,7 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host)
>          */
>
>         if (data->flags & MMC_DATA_READ) {
> -               if (host->chan_rx && !host->force_pio)
> +               if (host->dma_on)
>                         tmio_mmc_check_bounce_buffer(host);
>                 dev_dbg(&host->pdev->dev, "Complete Rx request %p\n",
>                         host->mrq);
> @@ -473,7 +473,7 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host, unsigned int stat)
>         if (stat & TMIO_STAT_CRCFAIL || stat & TMIO_STAT_STOPBIT_ERR ||
>             stat & TMIO_STAT_TXUNDERRUN)
>                 data->error = -EILSEQ;
> -       if (host->chan_tx && (data->flags & MMC_DATA_WRITE) && !host->force_pio) {
> +       if (host->dma_on && (data->flags & MMC_DATA_WRITE)) {
>                 u32 status = sd_ctrl_read16_and_16_as_32(host, CTL_STATUS);
>                 bool done = false;
>
> @@ -497,7 +497,7 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host, unsigned int stat)
>                         tmio_mmc_disable_mmc_irqs(host, TMIO_STAT_DATAEND);
>                         tmio_mmc_dataend_dma(host);
>                 }
> -       } else if (host->chan_rx && (data->flags & MMC_DATA_READ) && !host->force_pio) {
> +       } else if (host->dma_on && (data->flags & MMC_DATA_READ)) {
>                 tmio_mmc_disable_mmc_irqs(host, TMIO_STAT_DATAEND);
>                 tmio_mmc_dataend_dma(host);
>         } else {
> @@ -550,7 +550,7 @@ static void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat)
>          */
>         if (host->data && (!cmd->error || cmd->error == -EILSEQ)) {
>                 if (host->data->flags & MMC_DATA_READ) {
> -                       if (host->force_pio || !host->chan_rx) {
> +                       if (!host->dma_on) {
>                                 tmio_mmc_enable_mmc_irqs(host, TMIO_MASK_READOP);
>                         } else {
>                                 tmio_mmc_disable_mmc_irqs(host,
> @@ -558,7 +558,7 @@ static void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat)
>                                 tasklet_schedule(&host->dma_issue);
>                         }
>                 } else {
> -                       if (host->force_pio || !host->chan_tx) {
> +                       if (!host->dma_on) {
>                                 tmio_mmc_enable_mmc_irqs(host, TMIO_MASK_WRITEOP);
>                         } else {
>                                 tmio_mmc_disable_mmc_irqs(host,
> @@ -688,7 +688,7 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
>
>         tmio_mmc_init_sg(host, data);
>         host->data = data;
> -       host->force_pio = false;
> +       host->dma_on = false;
>
>         /* Set transfer length / blocksize */
>         sd_ctrl_write16(host, CTL_SD_XFER_LEN, data->blksz);
> diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
> index 1ee9fd0..91a2be4 100644
> --- a/drivers/mmc/host/uniphier-sd.c
> +++ b/drivers/mmc/host/uniphier-sd.c
> @@ -157,13 +157,14 @@ static void uniphier_sd_external_dma_start(struct tmio_mmc_host *host,
>         if (cookie < 0)
>                 goto unmap_sg;
>
> +       host->dma_on = true;
> +
>         return;
>
>  unmap_sg:
>         dma_unmap_sg(mmc_dev(host->mmc), host->sg_ptr, host->sg_len,
>                      priv->dma_dir);
>  force_pio:
> -       host->force_pio = true;
>         uniphier_sd_dma_endisable(host, 0);
>  }
>
> @@ -283,9 +284,10 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host,
>         writel(lower_32_bits(dma_addr), host->ctl + UNIPHIER_SD_DMA_ADDR_L);
>         writel(upper_32_bits(dma_addr), host->ctl + UNIPHIER_SD_DMA_ADDR_H);
>
> +       host->dma_on = true;
> +
>         return;
>  force_pio:
> -       host->force_pio = true;
>         uniphier_sd_dma_endisable(host, 0);
>  }
>
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-15 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 15:03 [PATCH] mmc: tmio: simplify the DMA mode test Masahiro Yamada
2018-10-14 22:36 ` Wolfram Sang
2018-10-15 11:33   ` Wolfram Sang
2018-10-15 13:15 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).