diff mbox

[v3,4/4] mmc: renesas_sdhi: skip SCC error check when retuning

Message ID 20180717145216.16840-5-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New, archived
Headers show

Commit Message

Niklas Söderlund July 17, 2018, 2:52 p.m. UTC
From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>

Checking for SCC error during retuning is unnecessary.

Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
[Niklas: fix small style issue]
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

---

* Changes since v2
- Added check for HS400 as it's now merged.
- Added tags from Wolfram.
---
 drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Simon Horman July 18, 2018, 8:54 a.m. UTC | #1
Hi Niklas,

On Tue, Jul 17, 2018 at 04:52:16PM +0200, Niklas Söderlund wrote:
> From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> 
> Checking for SCC error during retuning is unnecessary.
> 
> Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> [Niklas: fix small style issue]
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> ---
> 
> * Changes since v2
> - Added check for HS400 as it's now merged.
> - Added tags from Wolfram.
> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 777e32b0e410e850..a21b347424f67c52 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -444,6 +444,14 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
>  {
>  	struct renesas_sdhi *priv = host_to_priv(host);
>  
> +	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))

According to the BSP this needs to differentiate between 4tap and 8tap
variants of HS400 support.

> +		return false;
> +
> +	if (host->mmc->doing_retune)
> +		return false;
> +
>  	/* Check SCC error */
>  	if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) &
>  	    SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &&
> -- 
> 2.18.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang July 18, 2018, 9:46 a.m. UTC | #2
On Wed, Jul 18, 2018 at 10:54:08AM +0200, Simon Horman wrote:
> Hi Niklas,
> 
> On Tue, Jul 17, 2018 at 04:52:16PM +0200, Niklas Söderlund wrote:
> > From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > 
> > Checking for SCC error during retuning is unnecessary.
> > 
> > Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > [Niklas: fix small style issue]
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Sorry, Niklas, I got confused with the messages, that's my fault. I want
to revoke my tags here which were meant for another patch in your
series. I actually wanted to write a comment about...

> > 
> > ---
> > 
> > * Changes since v2
> > - Added check for HS400 as it's now merged.
> > - Added tags from Wolfram.
> > ---
> >  drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> > index 777e32b0e410e850..a21b347424f67c52 100644
> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -444,6 +444,14 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
> >  {
> >  	struct renesas_sdhi *priv = host_to_priv(host);
> >  
> > +	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))
> 
> According to the BSP this needs to differentiate between 4tap and 8tap
> variants of HS400 support.

... checking exactly this.
Niklas Söderlund July 18, 2018, 12:22 p.m. UTC | #3
Hi Simon,

On 2018-07-18 10:54:08 +0200, Simon Horman wrote:
> Hi Niklas,
> 
> On Tue, Jul 17, 2018 at 04:52:16PM +0200, Niklas Söderlund wrote:
> > From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > 
> > Checking for SCC error during retuning is unnecessary.
> > 
> > Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > [Niklas: fix small style issue]
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > 
> > ---
> > 
> > * Changes since v2
> > - Added check for HS400 as it's now merged.
> > - Added tags from Wolfram.
> > ---
> >  drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> > index 777e32b0e410e850..a21b347424f67c52 100644
> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -444,6 +444,14 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
> >  {
> >  	struct renesas_sdhi *priv = host_to_priv(host);
> >  
> > +	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))
> 
> According to the BSP this needs to differentiate between 4tap and 8tap
> variants of HS400 support.

Ahh I see, yes it looks like this patch will require some work to update 
to HS400. I might break this out to a own patch so the rest of the 
patches in this series can progress as they fix other unrelated issues.

Thanks for letting me know about this.

> 
> > +		return false;
> > +
> > +	if (host->mmc->doing_retune)
> > +		return false;
> > +
> >  	/* Check SCC error */
> >  	if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) &
> >  	    SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &&
> > -- 
> > 2.18.0
> >
Niklas Söderlund July 18, 2018, 12:23 p.m. UTC | #4
Hi Wolfram,

On 2018-07-18 11:46:29 +0200, Wolfram Sang wrote:
> On Wed, Jul 18, 2018 at 10:54:08AM +0200, Simon Horman wrote:
> > Hi Niklas,
> > 
> > On Tue, Jul 17, 2018 at 04:52:16PM +0200, Niklas Söderlund wrote:
> > > From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > > 
> > > Checking for SCC error during retuning is unnecessary.
> > > 
> > > Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > > [Niklas: fix small style issue]
> > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > > Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> Sorry, Niklas, I got confused with the messages, that's my fault. I want
> to revoke my tags here which were meant for another patch in your
> series. I actually wanted to write a comment about...

No problem, I think I need to do some more work on it as Simon pointed 
out more work is needed for HS400.

> 
> > > 
> > > ---
> > > 
> > > * Changes since v2
> > > - Added check for HS400 as it's now merged.
> > > - Added tags from Wolfram.
> > > ---
> > >  drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> > > index 777e32b0e410e850..a21b347424f67c52 100644
> > > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > > @@ -444,6 +444,14 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
> > >  {
> > >  	struct renesas_sdhi *priv = host_to_priv(host);
> > >  
> > > +	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))
> > 
> > According to the BSP this needs to differentiate between 4tap and 8tap
> > variants of HS400 support.
> 
> ... checking exactly this.
>
Simon Horman July 19, 2018, 7:40 a.m. UTC | #5
On Wed, Jul 18, 2018 at 02:22:18PM +0200, Niklas Söderlund wrote:
> Hi Simon,
> 
> On 2018-07-18 10:54:08 +0200, Simon Horman wrote:
> > Hi Niklas,
> > 
> > On Tue, Jul 17, 2018 at 04:52:16PM +0200, Niklas Söderlund wrote:
> > > From: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > > 
> > > Checking for SCC error during retuning is unnecessary.
> > > 
> > > Signed-off-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
> > > [Niklas: fix small style issue]
> > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > > Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > 
> > > ---
> > > 
> > > * Changes since v2
> > > - Added check for HS400 as it's now merged.
> > > - Added tags from Wolfram.
> > > ---
> > >  drivers/mmc/host/renesas_sdhi_core.c | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> > > index 777e32b0e410e850..a21b347424f67c52 100644
> > > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > > @@ -444,6 +444,14 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
> > >  {
> > >  	struct renesas_sdhi *priv = host_to_priv(host);
> > >  
> > > +	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))
> > 
> > According to the BSP this needs to differentiate between 4tap and 8tap
> > variants of HS400 support.
> 
> Ahh I see, yes it looks like this patch will require some work to update 
> to HS400. I might break this out to a own patch so the rest of the 
> patches in this series can progress as they fix other unrelated issues.
> 
> Thanks for letting me know about this.

Of course breaking this patch out from the series is fine by me.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 777e32b0e410e850..a21b347424f67c52 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -444,6 +444,14 @@  static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
 {
 	struct renesas_sdhi *priv = host_to_priv(host);
 
+	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))
+		return false;
+
+	if (host->mmc->doing_retune)
+		return false;
+
 	/* Check SCC error */
 	if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) &
 	    SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &&