linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] renesas_sdhi: fix hang when SCC loses its clock
@ 2020-06-04 11:20 Wolfram Sang
  2020-06-04 11:20 ` [PATCH 1/2] mmc: core: when downgrading HS400, callback into drivers earlier Wolfram Sang
  2020-06-04 11:20 ` [PATCH 2/2] mmc: renesas_sdhi: keep SCC clock active when tuning Wolfram Sang
  0 siblings, 2 replies; 13+ messages in thread
From: Wolfram Sang @ 2020-06-04 11:20 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

This was a nasty one because it wasn't reproducible for a long time.
Recent work on the manual calibration mechanism made it show up again
for me, so I could finally tackle it. The reason is that there is more
SCC handling now, so we are more likely to stumble again over the
problem that it may have no clock at that time.

There is a patch in the BSP handling this issue, too, but it didn't work
for me on at least v5.6+ kernels. Also, I thought it is way simpler to
keep the last working external frequency instead of defining a default
one per SoC generation.

Patches are based on mmc/next as of yesterday or so. You need the
'manual calibration' patches for the issue to show up. They are not
fully tested yet, so I will send them as RFC in a minute. Or just fetch
this branch:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/new_manual_calib

With that branch, reading a file from eMMC works for me(tm). If you
prevent 'keep_scc_freq' from being 'true', then reading a file should
stall the machine. Happened here on a R-Car M3-N to me.

Looking forward to comments and more tests.

Thanks,

   Wolfram

Wolfram Sang (2):
  mmc: core: when downgrading HS400, callback into drivers earlier
  mmc: renesas_sdhi: keep SCC clock active when tuning

 drivers/mmc/core/mmc.c               | 14 +++++++-------
 drivers/mmc/host/renesas_sdhi.h      |  1 +
 drivers/mmc/host/renesas_sdhi_core.c | 25 ++++++++++++++++++++++---
 3 files changed, 30 insertions(+), 10 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-09-01 13:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-04 11:20 [PATCH 0/2] renesas_sdhi: fix hang when SCC loses its clock Wolfram Sang
2020-06-04 11:20 ` [PATCH 1/2] mmc: core: when downgrading HS400, callback into drivers earlier Wolfram Sang
2020-06-08  6:02   ` Yoshihiro Shimoda
2020-06-08 20:41     ` Wolfram Sang
2020-06-09 10:35       ` Yoshihiro Shimoda
2020-06-04 11:20 ` [PATCH 2/2] mmc: renesas_sdhi: keep SCC clock active when tuning Wolfram Sang
2020-06-08  6:35   ` Yoshihiro Shimoda
2020-06-08 21:27     ` Wolfram Sang
2020-06-09 10:41       ` Yoshihiro Shimoda
2020-08-14  7:15         ` Wolfram Sang
2020-08-28  0:51           ` Yoshihiro Shimoda
2020-09-01 10:24             ` Wolfram Sang
2020-09-01 13:39               ` Wolfram Sang

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).