All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH RFT 0/3] mmc: tmio: honor busy timeouts properly
Date: Fri, 20 Nov 2020 15:26:26 +0100	[thread overview]
Message-ID: <20201120142629.98222-1-wsa+renesas@sang-engineering.com> (raw)

TMIO has a HW busy timeout detection which was always running but the
driver did not handle it yet in a proper way. This series fixes that.

Patch 1 sets max_busy_timeout, so the MMC core will not use R1B when it
is beyond the maximum HW timeout. Patch 2 adds proper handling of the
timeout interrupt. After ensuring both, we can finally enable the
WAIT_WHILE_BUSY capability to save the polling.

This was tested using my Renesas Salvator-XS (R-Car M3-N) and Lager
(R-Car H2). However, more advanced testing from the BSP team and/or
Shimoda-san would be much appreciated.

The branch is based on mmc/next plus one patch "[PATCH] mmc: tmio: Fix
command error processing". A branch is available here:

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

Yamada-san: I enabled setting max_busy_timeout for Uniphier as well
because I am quite sure this HW supports it and it will fix timeout
issues with long erase timeouts. I did not enable WAIT_WHILE_BUSY
because this is "only" an improvement and not a fix. I think opt-in
after some testing is good for that case.

I think all patches are 5.11 material to get enough testing. Patch 1
is IMHO stable material, nonetheless. I am open for discussions, of
course.

Looking forward to comments, reviews, tags...

Thanks and happy hacking,

   Wolfram


Masaharu Hayakawa (1):
  mmc: tmio: Add data timeout error detection

Wolfram Sang (2):
  mmc: tmio: set max_busy_timeout
  mmc: renesas_sdhi: enable WAIT_WHILE_BUSY

 drivers/mmc/host/renesas_sdhi_core.c          |  3 ++
 drivers/mmc/host/renesas_sdhi_internal_dmac.c |  4 +--
 drivers/mmc/host/renesas_sdhi_sys_dmac.c      |  7 ++--
 drivers/mmc/host/tmio_mmc.h                   |  8 +++--
 drivers/mmc/host/tmio_mmc_core.c              | 32 +++++++++++++++----
 drivers/mmc/host/uniphier-sd.c                |  1 +
 include/linux/mfd/tmio.h                      |  7 +++-
 7 files changed, 48 insertions(+), 14 deletions(-)

-- 
2.28.0


             reply	other threads:[~2020-11-20 14:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 14:26 Wolfram Sang [this message]
2020-11-20 14:26 ` [PATCH RFT 1/3] mmc: tmio: set max_busy_timeout Wolfram Sang
2020-11-20 14:51   ` Wolfram Sang
2020-11-20 14:26 ` [PATCH RFT 2/3] mmc: tmio: Add data timeout error detection Wolfram Sang
2020-11-20 14:26 ` [PATCH RFT 3/3] mmc: renesas_sdhi: enable WAIT_WHILE_BUSY 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=20201120142629.98222-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=masahiroy@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.