From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [RFC PATCH 4/6] mmc: tmio: enforce retune after runtime suspend
Date: Tue, 11 Feb 2020 00:53:54 +0100 [thread overview]
Message-ID: <20200210235354.GD2443363@oden.dyn.berto.se> (raw)
In-Reply-To: <20200129203709.30493-5-wsa+renesas@sang-engineering.com>
Hi Wolfram,
Thanks for your patch.
On 2020-01-29 21:37:07 +0100, Wolfram Sang wrote:
> Currently, select_tuning() is called after RPM resume. But
> select_tuning() needs some additional function calls to work correctly.
> Instead of reimplementing the whole postprocessing, just enforce
> retuning.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> I couldn't trigger RPM suspend even with debug code. Shimoda-san said
> it should only occur with removed cards which is not so easy with
> soldered eMMC. For those cases, I think the aproach taken here is fine.
> Needs more discussion, though, to make sure...
I really like the change so I really wanted to provoke a suspend to be
able to provide a tested by tag, but I have so far been unable to do so
:-(
>
> drivers/mmc/host/renesas_sdhi_core.c | 1 -
> drivers/mmc/host/tmio_mmc.h | 1 -
> drivers/mmc/host/tmio_mmc_core.c | 8 +-------
> 3 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 24ee8ac1fe21..0c9e5e010bda 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -898,7 +898,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
> dev_warn(&host->pdev->dev, "Unknown clock rate for tuning\n");
>
> host->execute_tuning = renesas_sdhi_execute_tuning;
> - host->select_tuning = renesas_sdhi_select_tuning;
> host->check_retune = renesas_sdhi_check_scc_error;
> host->prepare_hs400_tuning =
> renesas_sdhi_prepare_hs400_tuning;
> diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
> index bdb9973981ff..b6fffd3d2650 100644
> --- a/drivers/mmc/host/tmio_mmc.h
> +++ b/drivers/mmc/host/tmio_mmc.h
> @@ -183,7 +183,6 @@ struct tmio_mmc_host {
> * and mandatory for SDR104.
> */
> int (*execute_tuning)(struct tmio_mmc_host *host, u32 opcode);
> - int (*select_tuning)(struct tmio_mmc_host *host);
>
> /* Tuning values: 1 for success, 0 for failure */
> DECLARE_BITMAP(taps, BITS_PER_BYTE * sizeof(long));
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 3cacb516a66e..aeafa1c68ce2 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -1302,11 +1302,6 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
> }
> EXPORT_SYMBOL_GPL(tmio_mmc_host_runtime_suspend);
>
> -static bool tmio_mmc_can_retune(struct tmio_mmc_host *host)
> -{
> - return host->tap_num && mmc_can_retune(host->mmc);
> -}
> -
> int tmio_mmc_host_runtime_resume(struct device *dev)
> {
> struct tmio_mmc_host *host = dev_get_drvdata(dev);
> @@ -1323,8 +1318,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
>
> tmio_mmc_enable_dma(host, true);
>
> - if (tmio_mmc_can_retune(host) && host->select_tuning(host))
> - dev_warn(&host->pdev->dev, "Tuning selection failed\n");
> + mmc_retune_needed(host->mmc);
>
> return 0;
> }
> --
> 2.20.1
>
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2020-02-10 23:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 20:37 [RFC PATCH 0/6] mmc: tmio: move TAP handling to SDHI driver Wolfram Sang
2020-01-29 20:37 ` [RFC PATCH 1/6] mmc: tmio: refactor tuning execution into " Wolfram Sang
2020-02-10 22:44 ` Niklas Söderlund
2020-02-11 9:07 ` Wolfram Sang
2020-01-29 20:37 ` [RFC PATCH 2/6] mmc: renesas_sdhi: complain loudly if driver needs update Wolfram Sang
2020-02-10 22:47 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 3/6] mmc: tmio: give callback a generic name Wolfram Sang
2020-02-10 22:51 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 4/6] mmc: tmio: enforce retune after runtime suspend Wolfram Sang
2020-02-10 23:53 ` Niklas Söderlund [this message]
2020-01-29 20:37 ` [RFC PATCH 5/6] mmc: tmio: factor out TAP usage Wolfram Sang
2020-02-10 23:57 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 6/6] mmc: tmio: remove superfluous callback wrappers Wolfram Sang
2020-02-11 0:02 ` Niklas Söderlund
2020-02-11 9:09 ` Wolfram Sang
2020-02-05 0:22 ` [RFC PATCH 0/6] mmc: tmio: move TAP handling to SDHI driver Yoshihiro Shimoda
2020-02-13 13:56 ` 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=20200210235354.GD2443363@oden.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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).