From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH 1/2] mmc: tmio: abort DMA before reset
Date: Wed, 10 Mar 2021 11:34:38 +0100 [thread overview]
Message-ID: <YEigvgfGVUmeG/vP@oden.dyn.berto.se> (raw)
In-Reply-To: <20210309092332.30705-2-wsa+renesas@sang-engineering.com>
Hi Wolfram,
Thanks for your patch.
On 2021-03-09 10:23:31 +0100, Wolfram Sang wrote:
> We will soon allow resetting the whole IP core via a reset controller.
> For this case, DMA must be terminated before the actual reset. For the
> other cases, it is probably better, too.
I agree I think it makes more sens to abort dma before reseting the
device.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/mmc/host/tmio_mmc_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 5aa57640d0e6..eca767dcabba 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -172,11 +172,11 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
> sd_ctrl_write16(host, CTL_RESET_SD, 0x0001);
> usleep_range(10000, 11000);
>
> + tmio_mmc_abort_dma(host);
> +
> if (host->reset)
> host->reset(host);
>
> - tmio_mmc_abort_dma(host);
> -
> if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) {
> sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
> sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
> --
> 2.30.0
>
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2021-03-10 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 9:23 [PATCH 0/2] mmc: renesas_sdhi: reset via reset controller Wolfram Sang
2021-03-09 9:23 ` [PATCH 1/2] mmc: tmio: abort DMA before reset Wolfram Sang
2021-03-10 10:34 ` Niklas Söderlund [this message]
2021-03-09 9:23 ` [PATCH 2/2] mmc: renesas_sdhi: do hard reset if possible Wolfram Sang
2021-03-10 12:45 ` Yoshihiro Shimoda
2021-03-11 13:17 ` Wolfram Sang
2021-03-12 12:05 ` Yoshihiro Shimoda
2021-03-15 12:31 ` Wolfram Sang
2021-03-15 23:59 ` Yoshihiro Shimoda
2021-03-09 9:28 ` [PATCH 0/2] mmc: renesas_sdhi: reset via reset controller Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YEigvgfGVUmeG/vP@oden.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=geert@linux-m68k.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox