linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Cc: "linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Takeshi Saito <takeshi.saito.xv@renesas.com>
Subject: RE: [RFC PATCH 1/2] mmc: renesas_sdhi: Add manual correction
Date: Mon, 9 Dec 2019 06:42:55 +0000	[thread overview]
Message-ID: <TYAPR01MB454418FCE6AD83C0DE56E420D8580@TYAPR01MB4544.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20191203203301.2202-2-wsa+renesas@sang-engineering.com>

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:33 AM
> 
> This patch adds a manual correction mechanism for SDHI. Currently, SDHI
> uses automatic TAP position correction. However, TAP position can also
> be corrected manually via correction error status flags.
> 
> Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Pretty much like the BSP patch. Just some rebasing, refactorization and
> updates of the commit message. I especially changed the original
> calculation from:
> 
> +               host->tap_set = (host->tap_set +
> +                                host->tap_num + 1) % host->tap_num;
> 
>  to:
> 
> +		host->tap_set = (host->tap_set + 1) % host->tap_num;
> 
> (same for -1). Because "+ tap_num % tap_num" is a NOOP. Or did I miss
> something?

Thank you for the patch! I checked your calculation and it's no problem
because the type of host->tap_set is unsigned long.

example 1 (set = 0, num = 8, down):
 BSP code:  (0 + 8 - 1) % 8 = 7 % 8 = 7
 your code: (0 - 1) % 8 = 0xffffffffffffffff % 8 = 7

example 2 (set = 7, num = 8, up):
 BSP code:  (7 + 8 + 1) % 8 = 16 % 8 = 0
 your code: (7 + 1) % 8 = 8 % 8 = 0

So,

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

I have a nit comment below:

<snip>
>  static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
>  {
>  	struct renesas_sdhi *priv = host_to_priv(host);
>  	bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
> 
> -

nit: This deleting a blank line is not needed after the following patch was fixed :)
https://patchwork.kernel.org/patch/11271859/

Best regards,
Yoshihiro Shimoda


  parent reply	other threads:[~2019-12-09  6:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 20:32 [RFC PATCH 0/2] mmc: renesas_sdhi: add manual correction Wolfram Sang
2019-12-03 20:32 ` [RFC PATCH 1/2] mmc: renesas_sdhi: Add " Wolfram Sang
2019-12-04  9:44   ` Geert Uytterhoeven
2019-12-10 22:28     ` Wolfram Sang
2019-12-11  7:43       ` Geert Uytterhoeven
2019-12-13 16:18         ` Wolfram Sang
2019-12-09  6:42   ` Yoshihiro Shimoda [this message]
2019-12-03 20:33 ` [RFC PATCH 2/2] mmc: renesas_sdhi: enfore manual correction for Gen3 Wolfram Sang
2019-12-04  9:39   ` Geert Uytterhoeven
2019-12-09  7:00   ` Yoshihiro Shimoda
2019-12-03 20:33 ` [RFC PATCH 3/2] mmc: renesas_sdhi: remove double clear of automatic correction Wolfram Sang
2019-12-09  7:01   ` Yoshihiro Shimoda
2019-12-10 22:32 ` [RFC PATCH 0/2] mmc: renesas_sdhi: add manual correction 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=TYAPR01MB454418FCE6AD83C0DE56E420D8580@TYAPR01MB4544.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=takeshi.saito.xv@renesas.com \
    --cc=wsa+renesas@sang-engineering.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).