From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Takeshi Saito <takeshi.saito.xv@renesas.com>
Subject: Re: [PATCH 2/2] mmc: renesas_sdhi: support manual calibration
Date: Mon, 31 Aug 2020 13:41:47 +0200 [thread overview]
Message-ID: <20200831114147.GC1070@ninjato> (raw)
In-Reply-To: <TY2PR01MB369224E06BAE72C1711B681AD8510@TY2PR01MB3692.jpnprd01.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]
Hi Shimoda-san,
> We should set the needs_adjust_hs400 when HS400EN=1 is set.
> In other words, we should set it in renesas_sdhi_hs400_complete(),
> not renesas_sdhi_prepare_hs400_tuning().
Oh, thanks for pointing this out! I simply put it into the same function
as the BSP, but due to massive refactoring in the upstream driver we
really need to put it where tuning is completed. I used the following
patch on top of this patch:
diff --git b/drivers/mmc/host/renesas_sdhi_core.c a/drivers/mmc/host/renesas_sdhi_core.c
index 2834b30c3ba6..b54dd8a7ecaa 100644
--- b/drivers/mmc/host/renesas_sdhi_core.c
+++ a/drivers/mmc/host/renesas_sdhi_core.c
@@ -419,6 +419,9 @@ static void renesas_sdhi_hs400_complete(struct mmc_host *mmc)
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, CLK_CTL_SCLKEN |
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
+
+ if (priv->adjust_hs400_calib_table)
+ priv->needs_adjust_hs400 = true;
}
static void renesas_sdhi_reset_scc(struct tmio_mmc_host *host,
@@ -544,12 +547,8 @@ static void renesas_sdhi_reset_hs400_mode(struct tmio_mmc_host *host,
static int renesas_sdhi_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
- struct renesas_sdhi *priv = host_to_priv(host);
- if (priv->adjust_hs400_calib_table)
- priv->needs_adjust_hs400 = true;
-
- renesas_sdhi_reset_hs400_mode(host, priv);
+ renesas_sdhi_reset_hs400_mode(host, host_to_priv(host));
return 0;
}
and got these debug reports from my M3-N:
kworker/0:1-21 [000] .... 4.171435: renesas_sdhi_fixup_request: code 17 replacement 18
which was different without the fix:
kworker/0:1-21 [000] .... 4.171435: renesas_sdhi_fixup_request: code 31 replacement 31
> When we read the calib_code at room temperature, the value will be around 0x10.
> However, we will get 0x00 here. So, we need to fix it.
So, my new debug output looks good.
I will fold the fixup patch into the next version of this series. I
still need to get the stalled-SCC issue tackled first. But I am now
working on it.
Thanks again,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-08-31 11:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-05 10:12 [PATCH 0/2] mmc: renesas_sdhi: support manual calibration Wolfram Sang
2020-06-05 10:12 ` [PATCH 1/2] mmc: tmio: add generic hook to fixup after a completed request Wolfram Sang
2020-06-05 10:12 ` [PATCH 2/2] mmc: renesas_sdhi: support manual calibration Wolfram Sang
2020-08-31 6:22 ` Yoshihiro Shimoda
2020-08-31 11:41 ` Wolfram Sang [this message]
2020-06-16 11:32 ` [PATCH 0/2] " Ulf Hansson
2020-06-18 5:39 ` 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=20200831114147.GC1070@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=takeshi.saito.xv@renesas.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;
as well as URLs for NNTP newsgroup(s).