All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
Subject: Re: [PATCH 1/2] mmc: renesas_sdhi: skip SCC error check when retuning
Date: Wed, 25 Jul 2018 15:36:43 +0200	[thread overview]
Message-ID: <20180725133643.GE14991@bigcity.dyn.berto.se> (raw)
In-Reply-To: <20180725122106.jzv6v3j2wrtqrt6t@ninjato>

Hi Wolfram,

On 2018-07-25 14:21:07 +0200, Wolfram Sang wrote:
> Hi Niklas,
> 
> > * Changes since v3
> > - Add check for 4TAP for HS400.
> 
> Is it the same in the BSP or where does this info come from?

It comes from the BSP but I had to modify it to fit with the upstream 
implementation of 4 vs 8 taps. The original code from BSP:

        if (!(host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) &&
            !(host->mmc->ios.timing == MMC_TIMING_MMC_HS200) &&
            !(host->mmc->ios.timing == MMC_TIMING_MMC_HS400 &&
              !host->hs400_use_4tap))
                return false;
> 
> 
> > +	if (!(host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) &&
> > +	    !(host->mmc->ios.timing == MMC_TIMING_MMC_HS200) &&
> > +	    !(host->mmc->ios.timing == MMC_TIMING_MMC_HS400 &&
> > +	      !(host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400)))
> 
> This becomes very hard to read. We need to simplify it.

I agree but I could not find a neat way of doing it. How about?

    bool use_4tap = host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400;

    if (!(host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) &&
	!(host->mmc->ios.timing == MMC_TIMING_MMC_HS200) &&
	!(host->mmc->ios.timing == MMC_TIMING_MMC_HS400 && !use_4tap))
	   return false;

> 
> And can you bounce me your debugging mail from today again? I seem to
> have lost it :(

Bounced.

> 
> Thanks,
> 
>    Wolfram



-- 
Regards,
Niklas S�derlund

  reply	other threads:[~2018-07-25 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 12:10 [PATCH 0/2] mmc: {tmio,renesas_sdhi}: retune if SCC error detected Niklas Söderlund
2018-07-25 12:10 ` [PATCH 1/2] mmc: renesas_sdhi: skip SCC error check when retuning Niklas Söderlund
2018-07-25 12:21   ` Wolfram Sang
2018-07-25 13:36     ` Niklas Söderlund [this message]
2018-07-26  7:34       ` Wolfram Sang
2018-07-25 12:10 ` [PATCH 2/2] mmc: tmio: Fix SCC error detection Niklas Söderlund

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=20180725133643.GE14991@bigcity.dyn.berto.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=masaharu.hayakawa.ry@renesas.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    /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.