All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Masaharu Hayakawa" <masaharu.hayakawa.ry@renesas.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH 1/2] mmc: renesas_sdhi: skip SCC error check when retuning
Date: Wed, 25 Jul 2018 14:10:30 +0200	[thread overview]
Message-ID: <20180725121031.24277-2-niklas.soderlund+renesas@ragnatech.se> (raw)
In-Reply-To: <20180725121031.24277-1-niklas.soderlund+renesas@ragnatech.se>

From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>

Checking for SCC error during retuning is unnecessary.

Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
[Niklas: fix small style issue]
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

---

* Changes since v3
- Add check for 4TAP for HS400.

* Changes since v2
- Added check for HS400 as it's now merged.
- Added tags from Wolfram.
---
 drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 777e32b0e410e850..2e0d2eafd62ebecf 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -444,6 +444,15 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
 {
 	struct renesas_sdhi *priv = host_to_priv(host);
 
+	if (!(host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) &&
+	    !(host->mmc->ios.timing == MMC_TIMING_MMC_HS200) &&
+	    !(host->mmc->ios.timing == MMC_TIMING_MMC_HS400 &&
+	      !(host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400)))
+		return false;
+
+	if (host->mmc->doing_retune)
+		return false;
+
 	/* Check SCC error */
 	if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) &
 	    SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &&
-- 
2.18.0

  reply	other threads:[~2018-07-25 13:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 12:10 [PATCH 0/2] mmc: {tmio,renesas_sdhi}: retune if SCC error detected Niklas Söderlund
2018-07-25 12:10 ` Niklas Söderlund [this message]
2018-07-25 12:21   ` [PATCH 1/2] mmc: renesas_sdhi: skip SCC error check when retuning Wolfram Sang
2018-07-25 13:36     ` Niklas Söderlund
2018-07-26  7:34       ` Wolfram Sang
2018-07-25 12:10 ` [PATCH 2/2] mmc: tmio: Fix SCC error detection Niklas Söderlund

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=20180725121031.24277-2-niklas.soderlund+renesas@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=masaharu.hayakawa.ry@renesas.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.