Skip to contentSkip to conversation

mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting

RFC PATCH In review Wolfram Sang 3 participants 5 messages Sep 11, 2018 – Sep 18, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 mmc: sdhi: sys_dmac: check for all Gen3 types when whitelisting

From: Wolfram Sang <[email protected]>

Fixes 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")

---

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(-)
drivers/mmc/host/renesas_sdhi_sys_dmac.c +2 -1
index f5fcbb5dc8cd..f027f66fe0c1 100644
@@ -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;
 
Signature · 1 line
2.18.0
#1 lore raw
Quoted 9 lines · Wolfram Sang

From: Wolfram Sang <[email protected]>

Fixes 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")

---

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

Quoted 21 lines
 drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/renesas_sdhi_sys_dmac.c +2 -2
index f5fcbb5dc8cd..f027f66fe0c1 100644
@@ -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

#2 lore raw
Quoted 7 lines · Ulf Hansson
Quoted 6 lines · Wolfram Sang

From: Wolfram Sang <[email protected]>

Fixes 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")

---

Quoted 6 lines
Quoted 3 lines

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!

Reviewed-by on v1 1/1
#3 lore raw
In reply to Wolfram Sang
Quoted 9 lines · Wolfram Sang

From: Wolfram Sang <[email protected]>

Fixes 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")

---

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.

Quoted 20 lines
 drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/renesas_sdhi_sys_dmac.c +2 -1
index f5fcbb5dc8cd..f027f66fe0c1 100644
@@ -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;
 
Signature · 1 line
2.18.0
#4 lore raw
In reply to Wolfram Sang
Quoted 4 lines · Wolfram Sang

From: Wolfram Sang <[email protected]>

Fixes 26eb2607fa28 ("mmc: renesas_sdhi: add eMMC HS400 mode support")

Applied for fixes, thanks!

Kind regards
Uffe

Quoted 26 lines

---

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(-)
drivers/mmc/host/renesas_sdhi_sys_dmac.c +2 -2
index f5fcbb5dc8cd..f027f66fe0c1 100644
@@ -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