public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 2/2] mmc: renesas_sdhi: do hard reset if possible
Date: Thu, 11 Mar 2021 14:17:48 +0100	[thread overview]
Message-ID: <20210311131748.GG3566@ninjato> (raw)
In-Reply-To: <TY2PR01MB3692A6D95BD60A17AE698DF3D8919@TY2PR01MB3692.jpnprd01.prod.outlook.com>

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

Hi Shimoda-san,

> # In other words, if a controller doesn't have scc, the previous code cannot issue
> # CMD13 in such a case, I guess.

Makes sense.

>  	tmio_mmc_reset(host);
> +	host->set_clock(host, host->clk_cache);

What about putting it into the reset function itself, so it will be
always enabled (like for the scc_ctl case)?

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 473f155f6d3d..672953e3362d 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -572,6 +572,7 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host)
 		read_poll_timeout(reset_control_status, ret, ret == 0, 1, 100,
 				  false, priv->rstc);
 		priv->needs_adjust_hs400 = false;
+		renesas_sdhi_set_clock(host, host->clk_cache);
 	} else if (priv->scc_ctl) {
 		renesas_sdhi_disable_scc(host->mmc);
 		renesas_sdhi_reset_hs400_mode(host, priv);

If you agree, I will fold this into v2 of this series.


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

  reply	other threads:[~2021-03-11 13:18 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
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 [this message]
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=20210311131748.GG3566@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --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