All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting
@ 2018-09-11 13:06 Wolfram Sang
  2018-09-11 13:29 ` Ulf Hansson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wolfram Sang @ 2018-09-11 13:06 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Niklas Söderlund, Yoshihiro Shimoda,
	Wolfram Sang

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

Fixes: 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

So, adding HS400 support broke the detection here. I suggest we discuss
internally, if this kind of white listing is still needed, at all. Until
then, this patch makes things work again on H3 and M3-W.

 drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index f5fcbb5dc8cd..f027f66fe0c1 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -495,7 +495,8 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
 
 static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
 {
-	if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
+	if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
+	    of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
 	    !soc_device_match(gen3_soc_whitelist))
 		return -ENODEV;
 
-- 
2.18.0

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

* Re: [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting
  2018-09-11 13:06 [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting Wolfram Sang
@ 2018-09-11 13:29 ` Ulf Hansson
  2018-09-11 13:58   ` Wolfram Sang
  2018-09-12  9:34 ` Simon Horman
  2018-09-17 18:34 ` Ulf Hansson
  2 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2018-09-11 13:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, Linux-Renesas, Niklas Söderlund,
	Yoshihiro Shimoda, Wolfram Sang

On 11 September 2018 at 15:06, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Fixes: 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> So, adding HS400 support broke the detection here. I suggest we discuss
> internally, if this kind of white listing is still needed, at all. Until
> then, this patch makes things work again on H3 and M3-W.

As this is tagged "RFC PATCH", does it mean that you want the
discussion to happen before I apply this for fixes?

Kind regards
Uffe

>
>  drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index f5fcbb5dc8cd..f027f66fe0c1 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -495,7 +495,8 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
>
>  static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
>  {
> -       if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
> +       if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
> +           of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
>             !soc_device_match(gen3_soc_whitelist))
>                 return -ENODEV;
>
> --
> 2.18.0
>

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

* Re: [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting
  2018-09-11 13:29 ` Ulf Hansson
@ 2018-09-11 13:58   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2018-09-11 13:58 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-mmc, Linux-Renesas, Niklas Söderlund,
	Yoshihiro Shimoda, Wolfram Sang

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

On Tue, Sep 11, 2018 at 03:29:14PM +0200, Ulf Hansson wrote:
> On 11 September 2018 at 15:06, Wolfram Sang <wsa@the-dreams.de> wrote:
> > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> >
> > Fixes: 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >
> > So, adding HS400 support broke the detection here. I suggest we discuss
> > internally, if this kind of white listing is still needed, at all. Until
> > then, this patch makes things work again on H3 and M3-W.
> 
> As this is tagged "RFC PATCH", does it mean that you want the
> discussion to happen before I apply this for fixes?

Yes, exactly. This is more "to talk over code".

Thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting
  2018-09-11 13:06 [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting Wolfram Sang
  2018-09-11 13:29 ` Ulf Hansson
@ 2018-09-12  9:34 ` Simon Horman
  2018-09-17 18:34 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2018-09-12  9:34 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, linux-renesas-soc, Niklas Söderlund,
	Yoshihiro Shimoda, Wolfram Sang

On Tue, Sep 11, 2018 at 03:06:26PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> Fixes: 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> So, adding HS400 support broke the detection here. I suggest we discuss
> internally, if this kind of white listing is still needed, at all. Until
> then, this patch makes things work again on H3 and M3-W.

Ouch, sorry about letting this in.

This fix looks fine to me, notwithstanding discussion of the whitelisting
approach itself.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

>  drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index f5fcbb5dc8cd..f027f66fe0c1 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -495,7 +495,8 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
>  
>  static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
>  {
> -	if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
> +	if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
> +	    of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
>  	    !soc_device_match(gen3_soc_whitelist))
>  		return -ENODEV;
>  
> -- 
> 2.18.0
> 

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

* Re: [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting
  2018-09-11 13:06 [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting Wolfram Sang
  2018-09-11 13:29 ` Ulf Hansson
  2018-09-12  9:34 ` Simon Horman
@ 2018-09-17 18:34 ` Ulf Hansson
  2 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2018-09-17 18:34 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mmc, Linux-Renesas, Niklas Söderlund,
	Yoshihiro Shimoda, Wolfram Sang

On 11 September 2018 at 15:06, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Fixes: 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied for fixes, thanks!

Kind regards
Uffe

> ---
>
> So, adding HS400 support broke the detection here. I suggest we discuss
> internally, if this kind of white listing is still needed, at all. Until
> then, this patch makes things work again on H3 and M3-W.
>
>  drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index f5fcbb5dc8cd..f027f66fe0c1 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -495,7 +495,8 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
>
>  static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
>  {
> -       if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
> +       if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
> +           of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
>             !soc_device_match(gen3_soc_whitelist))
>                 return -ENODEV;
>
> --
> 2.18.0
>

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

end of thread, other threads:[~2018-09-18  0:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 13:06 [RFC PATCH] mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting Wolfram Sang
2018-09-11 13:29 ` Ulf Hansson
2018-09-11 13:58   ` Wolfram Sang
2018-09-12  9:34 ` Simon Horman
2018-09-17 18:34 ` Ulf Hansson

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.