From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH v2 0/4] renesas_sdhi: fix hang when SCC loses its clock
Date: Tue, 1 Sep 2020 17:02:46 +0200 [thread overview]
Message-ID: <20200901150250.26236-1-wsa+renesas@sang-engineering.com> (raw)
This again took a while since v1 because the issue was so hard to
trigger. But I finally found a way to inject the flaw, so this series
could be tested and it fixes the issue.
Changes since v1:
* introduce a new flag to MMC core indicating any kind of tuning
not only retune
* use the new flag to keep SCC flag active
* new patch 4, minor cleanup to MMC core
A branch including the DEBUG patch can be found here:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/new_manual_calib-for-5.10
If you revert patch 3, you should have the SCC hang during boot again.
For the record, let me copy some findings I mentioned in another thread:
===
Interesting news: The hang comes from a code path I would have not
expected. It is not because of accessing an SCC register, it is this
line from renesas_sdhi_set_clock() which causes the issue:
186 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & CLK_CTL_DIV_MASK);
I mean I can guess that the clock setting has something to do with the
SCC, but I can't see the direct connection with the documentation I
have.
===
Tested on R-Car H3 ES2.0 and M3-N and patches based on mmc/next.
Another hope this is gone for good now...
Kind regards,
Wolfram
Wolfram Sang (4):
mmc: core: when downgrading HS400, callback into drivers earlier
mmc: core: add a 'doing_init_tune' flag and a 'mmc_doing_tune' helper
mmc: renesas_sdhi: keep SCC clock active when tuning
mmc: core: simplify an expression
drivers/mmc/core/mmc.c | 16 ++++++++++------
drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++--
include/linux/mmc/host.h | 6 ++++++
3 files changed, 22 insertions(+), 8 deletions(-)
--
2.20.1
next reply other threads:[~2020-09-01 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 15:02 Wolfram Sang [this message]
2020-09-01 15:02 ` [PATCH v2 1/4] mmc: core: when downgrading HS400, callback into drivers earlier Wolfram Sang
2020-09-01 15:02 ` [PATCH v2 2/4] mmc: core: add a 'doing_init_tune' flag and a 'mmc_doing_tune' helper Wolfram Sang
2020-09-01 15:02 ` [PATCH v2 3/4] mmc: renesas_sdhi: keep SCC clock active when tuning Wolfram Sang
2020-09-01 15:02 ` [PATCH v2 4/4] mmc: core: simplify an expression Wolfram Sang
2020-09-02 9:51 ` [PATCH v2 0/4] renesas_sdhi: fix hang when SCC loses its clock Yoshihiro Shimoda
2020-09-03 8:10 ` Ulf Hansson
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=20200901150250.26236-1-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--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 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.