linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling
@ 2019-06-06 11:35 Wolfram Sang
  2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-06-06 11:35 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Niklas Söderlund,
	Fabrizio Castro, Wolfram Sang

There are some more SoCs which cannot handle HS400. Add them and clean up the
quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.

Note that I don't have that HW, so I am relying on the provided information.

Changes since v1 (thanks Geert and Fabrizio!):
	* use '[012]' to specify the range instead of single entries
	* add RZ/G2M to the list

Wolfram Sang (3):
  mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
  mmc: sdhi: improve quirk descriptions
  mmc: sdhi: remove unneeded initialization

 drivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
  2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
@ 2019-06-06 11:35 ` Wolfram Sang
  2019-06-06 12:57   ` Geert Uytterhoeven
  2019-06-06 13:10   ` Fabrizio Castro
  2019-06-06 11:35 ` [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions Wolfram Sang
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-06-06 11:35 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Niklas Söderlund,
	Fabrizio Castro, Wolfram Sang

Our HW engineers informed us that HS400 is not working on these SoC
revisions.

Fixes: 0f4e2054c971 ("mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012]")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index db73f9f1b186..683c449a2f94 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -620,11 +620,16 @@ static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = {
 	.hs400_4taps = true,
 };
 
+static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = {
+	.hs400_disabled = true,
+};
+
 static const struct soc_device_attribute sdhi_quirks_match[]  = {
 	{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_h3_m3w_es1 },
 	{ .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_h3_es2 },
-	{ .soc_id = "r8a7796", .revision = "ES1.0", .data = &sdhi_quirks_h3_m3w_es1 },
-	{ .soc_id = "r8a7796", .revision = "ES1.1", .data = &sdhi_quirks_h3_m3w_es1 },
+	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
+	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
+	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
 	{ /* Sentinel. */ },
 };
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions
  2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
  2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
@ 2019-06-06 11:35 ` Wolfram Sang
  2019-06-06 12:58   ` Geert Uytterhoeven
  2019-06-06 11:35 ` [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization Wolfram Sang
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2019-06-06 11:35 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Niklas Söderlund,
	Fabrizio Castro, Wolfram Sang

Quirks show up in new SoCs as well, so the naming should be generic.
Describe them by what they do.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 683c449a2f94..24857ced9f2e 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -610,12 +610,12 @@ static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable)
 	renesas_sdhi_sdbuf_width(host, enable ? width : 16);
 }
 
-static const struct renesas_sdhi_quirks sdhi_quirks_h3_m3w_es1 = {
+static const struct renesas_sdhi_quirks sdhi_quirks_4tap_nohs400 = {
 	.hs400_disabled = true,
 	.hs400_4taps = true,
 };
 
-static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = {
+static const struct renesas_sdhi_quirks sdhi_quirks_4tap = {
 	.hs400_disabled = false,
 	.hs400_4taps = true,
 };
@@ -625,10 +625,10 @@ static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = {
 };
 
 static const struct soc_device_attribute sdhi_quirks_match[]  = {
-	{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_h3_m3w_es1 },
-	{ .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_h3_es2 },
-	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
-	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
+	{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_4tap_nohs400 },
+	{ .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_4tap },
+	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
+	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
 	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
 	{ /* Sentinel. */ },
 };
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization
  2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
  2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
  2019-06-06 11:35 ` [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions Wolfram Sang
@ 2019-06-06 11:35 ` Wolfram Sang
  2019-06-06 12:58   ` Geert Uytterhoeven
  2019-06-10 12:48 ` [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Niklas Söderlund
  2019-06-10 16:17 ` Ulf Hansson
  4 siblings, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2019-06-06 11:35 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Niklas Söderlund,
	Fabrizio Castro, Wolfram Sang

Bools are initialized to 'false' by default.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 24857ced9f2e..64d3b5fb7fe5 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -616,7 +616,6 @@ static const struct renesas_sdhi_quirks sdhi_quirks_4tap_nohs400 = {
 };
 
 static const struct renesas_sdhi_quirks sdhi_quirks_4tap = {
-	.hs400_disabled = false,
 	.hs400_4taps = true,
 };
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
  2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
@ 2019-06-06 12:57   ` Geert Uytterhoeven
  2019-06-06 13:10   ` Fabrizio Castro
  1 sibling, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-06-06 12:57 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda,
	Niklas Söderlund, Fabrizio Castro

On Thu, Jun 6, 2019 at 2:34 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Our HW engineers informed us that HS400 is not working on these SoC
> revisions.
>
> Fixes: 0f4e2054c971 ("mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012]")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions
  2019-06-06 11:35 ` [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions Wolfram Sang
@ 2019-06-06 12:58   ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-06-06 12:58 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda,
	Niklas Söderlund, Fabrizio Castro

On Thu, Jun 6, 2019 at 2:36 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Quirks show up in new SoCs as well, so the naming should be generic.
> Describe them by what they do.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization
  2019-06-06 11:35 ` [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization Wolfram Sang
@ 2019-06-06 12:58   ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-06-06 12:58 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda,
	Niklas Söderlund, Fabrizio Castro

On Thu, Jun 6, 2019 at 2:36 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Bools are initialized to 'false' by default.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
  2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
  2019-06-06 12:57   ` Geert Uytterhoeven
@ 2019-06-06 13:10   ` Fabrizio Castro
  1 sibling, 0 replies; 10+ messages in thread
From: Fabrizio Castro @ 2019-06-06 13:10 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc
  Cc: linux-renesas-soc, Yoshihiro Shimoda, Niklas Söderlund

Hello Wolfram!

Thank you for adding the r8a774a1 to the list!

> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Sent: 06 June 2019 12:36
> Subject: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
> 
> Our HW engineers informed us that HS400 is not working on these SoC
> revisions.
> 
> Fixes: 0f4e2054c971 ("mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012]")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index db73f9f1b186..683c449a2f94 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -620,11 +620,16 @@ static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = {
>  	.hs400_4taps = true,
>  };
> 
> +static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = {
> +	.hs400_disabled = true,
> +};
> +
>  static const struct soc_device_attribute sdhi_quirks_match[]  = {
>  	{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_h3_m3w_es1 },
>  	{ .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_h3_es2 },
> -	{ .soc_id = "r8a7796", .revision = "ES1.0", .data = &sdhi_quirks_h3_m3w_es1 },
> -	{ .soc_id = "r8a7796", .revision = "ES1.1", .data = &sdhi_quirks_h3_m3w_es1 },
> +	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
> +	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_h3_m3w_es1 },
> +	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
>  	{ /* Sentinel. */ },
>  };
> 
> --
> 2.11.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling
  2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
                   ` (2 preceding siblings ...)
  2019-06-06 11:35 ` [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization Wolfram Sang
@ 2019-06-10 12:48 ` Niklas Söderlund
  2019-06-10 16:17 ` Ulf Hansson
  4 siblings, 0 replies; 10+ messages in thread
From: Niklas Söderlund @ 2019-06-10 12:48 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, linux-renesas-soc, Yoshihiro Shimoda, Fabrizio Castro

Hi (again) Wolfram,

I now see there was a v2 of this series which addressed Geert's 
comments. Sorry for missing this and replying to v1. For the whole 
series,

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

On 2019-06-06 13:35:34 +0200, Wolfram Sang wrote:
> There are some more SoCs which cannot handle HS400. Add them and clean up the
> quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.
> 
> Note that I don't have that HW, so I am relying on the provided information.
> 
> Changes since v1 (thanks Geert and Fabrizio!):
> 	* use '[012]' to specify the range instead of single entries
> 	* add RZ/G2M to the list
> 
> Wolfram Sang (3):
>   mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
>   mmc: sdhi: improve quirk descriptions
>   mmc: sdhi: remove unneeded initialization
> 
>  drivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> -- 
> 2.11.0
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling
  2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
                   ` (3 preceding siblings ...)
  2019-06-10 12:48 ` [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Niklas Söderlund
@ 2019-06-10 16:17 ` Ulf Hansson
  4 siblings, 0 replies; 10+ messages in thread
From: Ulf Hansson @ 2019-06-10 16:17 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, Linux-Renesas, Yoshihiro Shimoda,
	Niklas Söderlund, Fabrizio Castro

On Thu, 6 Jun 2019 at 13:35, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> There are some more SoCs which cannot handle HS400. Add them and clean up the
> quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.
>
> Note that I don't have that HW, so I am relying on the provided information.
>
> Changes since v1 (thanks Geert and Fabrizio!):
>         * use '[012]' to specify the range instead of single entries
>         * add RZ/G2M to the list
>
> Wolfram Sang (3):
>   mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
>   mmc: sdhi: improve quirk descriptions
>   mmc: sdhi: remove unneeded initialization
>
>  drivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
>

Applied patch 1 for fixes and by adding a stable tag, the rest is
applied for next, thanks!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-06-10 16:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 11:35 [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Wolfram Sang
2019-06-06 11:35 ` [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H Wolfram Sang
2019-06-06 12:57   ` Geert Uytterhoeven
2019-06-06 13:10   ` Fabrizio Castro
2019-06-06 11:35 ` [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions Wolfram Sang
2019-06-06 12:58   ` Geert Uytterhoeven
2019-06-06 11:35 ` [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization Wolfram Sang
2019-06-06 12:58   ` Geert Uytterhoeven
2019-06-10 12:48 ` [PATCH v2 0/3] mmc: sdhi: improve HS400 quirk handling Niklas Söderlund
2019-06-10 16:17 ` Ulf Hansson

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).