All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mmc: mediatek: add optional module reset property mmc: mediatek: add optional module reset property  arm64: dts: mt7622: add reset node for mmc device Documentation/devicetree/bindings/mmc/mtk-sd.txt |  2 ++ arch/arm64/boot/dts/mediatek/mt7622.dtsi         |  2 ++ drivers/mmc/host/mtk-sd.c                        | 13 +++++++++++++ 3 files changed, 17 insertions(+)
@ 2020-08-12  9:37 ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, Philipp Zabel, linux-mmc,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	srv_heupstream

--
2.18.0

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

* [PATCH 0/3] mmc: mediatek: add optional module reset property mmc: mediatek: add optional module reset property arm64: dts: mt7622: add reset node for mmc device Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++ drivers/mmc/host/mtk-sd.c | 13 +++++++++++++ 3 files changed, 17 insertions(+)
@ 2020-08-12  9:37 ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 0/3] mmc: mediatek: add optional module reset property mmc: mediatek: add optional module reset property arm64: dts: mt7622: add reset node for mmc device Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++ drivers/mmc/host/mtk-sd.c | 13 +++++++++++++ 3 files changed, 17 insertions(+)
@ 2020-08-12  9:37 ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
  2020-08-12  9:37 ` Wenbin Mei
  (?)
@ 2020-08-12  9:37   ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, Philipp Zabel, linux-mmc,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	srv_heupstream, Wenbin Mei

Add description for resets/reset-names.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 8a532f4453f2..35da72de7aac 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -49,6 +49,8 @@ Optional properties:
 		     error caused by stop clock(fifo full)
 		     Valid range = [0:0x7]. if not present, default value is 0.
 		     applied to compatible "mediatek,mt2701-mmc".
+- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
+- reset-names: Reset names for MSDC.
 
 Examples:
 mmc0: mmc@11230000 {
-- 
2.18.0

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

* [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

Add description for resets/reset-names.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 8a532f4453f2..35da72de7aac 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -49,6 +49,8 @@ Optional properties:
 		     error caused by stop clock(fifo full)
 		     Valid range = [0:0x7]. if not present, default value is 0.
 		     applied to compatible "mediatek,mt2701-mmc".
+- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
+- reset-names: Reset names for MSDC.
 
 Examples:
 mmc0: mmc@11230000 {
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

Add description for resets/reset-names.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 8a532f4453f2..35da72de7aac 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -49,6 +49,8 @@ Optional properties:
 		     error caused by stop clock(fifo full)
 		     Valid range = [0:0x7]. if not present, default value is 0.
 		     applied to compatible "mediatek,mt2701-mmc".
+- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
+- reset-names: Reset names for MSDC.
 
 Examples:
 mmc0: mmc@11230000 {
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
  2020-08-12  9:37 ` Wenbin Mei
  (?)
@ 2020-08-12  9:37   ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, Philipp Zabel, linux-mmc,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	srv_heupstream, Wenbin Mei

This commit adds reset node for mmc device.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 1a39e0ef776b..5b9ec032ce8d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -686,6 +686,8 @@
 		clocks = <&pericfg CLK_PERI_MSDC30_0_PD>,
 			 <&topckgen CLK_TOP_MSDC50_0_SEL>;
 		clock-names = "source", "hclk";
+		resets = <&pericfg MT7622_PERI_MSDC0_SW_RST>;
+		reset-names = "hrst";
 		status = "disabled";
 	};
 
-- 
2.18.0

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

* [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

This commit adds reset node for mmc device.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 1a39e0ef776b..5b9ec032ce8d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -686,6 +686,8 @@
 		clocks = <&pericfg CLK_PERI_MSDC30_0_PD>,
 			 <&topckgen CLK_TOP_MSDC50_0_SEL>;
 		clock-names = "source", "hclk";
+		resets = <&pericfg MT7622_PERI_MSDC0_SW_RST>;
+		reset-names = "hrst";
 		status = "disabled";
 	};
 
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

This commit adds reset node for mmc device.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 1a39e0ef776b..5b9ec032ce8d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -686,6 +686,8 @@
 		clocks = <&pericfg CLK_PERI_MSDC30_0_PD>,
 			 <&topckgen CLK_TOP_MSDC50_0_SEL>;
 		clock-names = "source", "hclk";
+		resets = <&pericfg MT7622_PERI_MSDC0_SW_RST>;
+		reset-names = "hrst";
 		status = "disabled";
 	};
 
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] mmc: mediatek: add optional module reset property
  2020-08-12  9:37 ` Wenbin Mei
  (?)
@ 2020-08-12  9:37   ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, Philipp Zabel, linux-mmc,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	srv_heupstream, Wenbin Mei

This patch adds a optional reset management for msdc.
Sometimes the bootloader does not bring msdc register
to default state, so need reset the msdc controller.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 39e7fc54c438..2b243c03c9b2 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
+#include <linux/reset.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/core.h>
@@ -434,6 +435,7 @@ struct msdc_host {
 	struct msdc_save_para save_para; /* used when gate HCLK */
 	struct msdc_tune_para def_tune_para; /* default tune setting */
 	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
+	struct reset_control *reset;
 };
 
 static const struct mtk_mmc_compatible mt8135_compat = {
@@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
 	u32 val;
 	u32 tune_reg = host->dev_comp->pad_tune_reg;
 
+	if (!IS_ERR(host->reset)) {
+		reset_control_assert(host->reset);
+		usleep_range(10, 50);
+		reset_control_deassert(host->reset);
+	}
+
 	/* Configure to MMC/SD mode, clock free running */
 	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
 
@@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	if (IS_ERR(host->src_clk_cg))
 		host->src_clk_cg = NULL;
 
+	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
+								"hrst");
+	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
+		return PTR_ERR(host->reset);
+
 	host->irq = platform_get_irq(pdev, 0);
 	if (host->irq < 0) {
 		ret = -EINVAL;
-- 
2.18.0

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

* [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

This patch adds a optional reset management for msdc.
Sometimes the bootloader does not bring msdc register
to default state, so need reset the msdc controller.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 39e7fc54c438..2b243c03c9b2 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
+#include <linux/reset.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/core.h>
@@ -434,6 +435,7 @@ struct msdc_host {
 	struct msdc_save_para save_para; /* used when gate HCLK */
 	struct msdc_tune_para def_tune_para; /* default tune setting */
 	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
+	struct reset_control *reset;
 };
 
 static const struct mtk_mmc_compatible mt8135_compat = {
@@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
 	u32 val;
 	u32 tune_reg = host->dev_comp->pad_tune_reg;
 
+	if (!IS_ERR(host->reset)) {
+		reset_control_assert(host->reset);
+		usleep_range(10, 50);
+		reset_control_deassert(host->reset);
+	}
+
 	/* Configure to MMC/SD mode, clock free running */
 	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
 
@@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	if (IS_ERR(host->src_clk_cg))
 		host->src_clk_cg = NULL;
 
+	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
+								"hrst");
+	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
+		return PTR_ERR(host->reset);
+
 	host->irq = platform_get_irq(pdev, 0);
 	if (host->irq < 0) {
 		ret = -EINVAL;
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12  9:37   ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12  9:37 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring
  Cc: devicetree, Wenbin Mei, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing

This patch adds a optional reset management for msdc.
Sometimes the bootloader does not bring msdc register
to default state, so need reset the msdc controller.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
---
 drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 39e7fc54c438..2b243c03c9b2 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
+#include <linux/reset.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/core.h>
@@ -434,6 +435,7 @@ struct msdc_host {
 	struct msdc_save_para save_para; /* used when gate HCLK */
 	struct msdc_tune_para def_tune_para; /* default tune setting */
 	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
+	struct reset_control *reset;
 };
 
 static const struct mtk_mmc_compatible mt8135_compat = {
@@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
 	u32 val;
 	u32 tune_reg = host->dev_comp->pad_tune_reg;
 
+	if (!IS_ERR(host->reset)) {
+		reset_control_assert(host->reset);
+		usleep_range(10, 50);
+		reset_control_deassert(host->reset);
+	}
+
 	/* Configure to MMC/SD mode, clock free running */
 	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
 
@@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	if (IS_ERR(host->src_clk_cg))
 		host->src_clk_cg = NULL;
 
+	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
+								"hrst");
+	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
+		return PTR_ERR(host->reset);
+
 	host->irq = platform_get_irq(pdev, 0);
 	if (host->irq < 0) {
 		ret = -EINVAL;
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
  2020-08-12  9:37   ` Wenbin Mei
  (?)
@ 2020-08-12 10:07     ` Frank Wunderlich
  -1 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:07 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: Ulf Hansson, Rob Herring, devicetree, Wenbin Mei, srv_heupstream,
	linux-mmc, linux-kernel, linux-mediatek, linux-arm-kernel,
	Philipp Zabel, Matthias Brugger, Chaotian Jing, stable

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline

imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64

before we got these Errors on mounting eMMC ion R64:

[   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

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

* Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 10:07     ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:07 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: devicetree, Ulf Hansson, Wenbin Mei, srv_heupstream, linux-mmc,
	linux-kernel, stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline

imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64

before we got these Errors on mounting eMMC ion R64:

[   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 10:07     ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:07 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: devicetree, Ulf Hansson, Wenbin Mei, srv_heupstream, linux-mmc,
	linux-kernel, stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline

imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64

before we got these Errors on mounting eMMC ion R64:

[   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
  2020-08-12  9:37   ` Wenbin Mei
  (?)
@ 2020-08-12 10:33     ` Frank Wunderlich
  -1 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:33 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: Ulf Hansson, Rob Herring, devicetree, Wenbin Mei, srv_heupstream,
	linux-mmc, linux-kernel, linux-mediatek, linux-arm-kernel,
	Philipp Zabel, Matthias Brugger, Chaotian Jing, stable

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline
same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

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

* Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12 10:33     ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:33 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: devicetree, Ulf Hansson, Wenbin Mei, srv_heupstream, linux-mmc,
	linux-kernel, stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline
same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12 10:33     ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 10:33 UTC (permalink / raw)
  To: Wenbin Mei
  Cc: devicetree, Ulf Hansson, Wenbin Mei, srv_heupstream, linux-mmc,
	linux-kernel, stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

> Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property

> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>

Thanks for posting the fix to Mainline
same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64

Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
Tested-By: Frank Wunderlich <frank-w@public-files.de>

and it needs to be fixed at least for 5.4+, so adding stable-CC

Cc: stable@vger.kernel.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
  2020-08-12 10:07     ` Frank Wunderlich
  (?)
@ 2020-08-12 11:55       ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:55 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: Ulf Hansson, Rob Herring, devicetree, srv_heupstream, linux-mmc,
	linux-kernel, linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing, stable

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:07 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> 
> imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64
> 
> before we got these Errors on mounting eMMC ion R64:
> 
> [   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
> [   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org


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

* Re: Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 11:55       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:55 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:07 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> 
> imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64
> 
> before we got these Errors on mounting eMMC ion R64:
> 
> [   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
> [   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: Aw: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 11:55       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:55 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:07 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> 
> imho this should contain a fixes-Tag as it fixes eMMC-Access on mt7622/Bpi-R64
> 
> before we got these Errors on mounting eMMC ion R64:
> 
> [   48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
> [   48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
  2020-08-12 10:33     ` Frank Wunderlich
  (?)
@ 2020-08-12 11:57       ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:57 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: Ulf Hansson, Rob Herring, devicetree, srv_heupstream, linux-mmc,
	linux-kernel, linux-mediatek, linux-arm-kernel, Philipp Zabel,
	Matthias Brugger, Chaotian Jing, stable

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:33 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org


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

* Re: Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12 11:57       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:57 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:33 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: Aw: [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device
@ 2020-08-12 11:57       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 11:57 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	stable, Rob Herring, linux-mediatek, Chaotian Jing,
	Philipp Zabel, Matthias Brugger, linux-arm-kernel

Thanks for your reply.
I will add this in the next version.
On Wed, 2020-08-12 at 12:33 +0200, Frank Wunderlich wrote:
> > Gesendet: Mittwoch, 12. August 2020 um 11:37 Uhr
> > Von: "Wenbin Mei" <wenbin.mei@mediatek.com>
> > Betreff: [PATCH 3/3] mmc: mediatek: add optional module reset property
> 
> > This patch adds a optional reset management for msdc.
> > Sometimes the bootloader does not bring msdc register
> > to default state, so need reset the msdc controller.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> 
> Thanks for posting the fix to Mainline
> same as 3/3, dts-patch is also needed for fixing eMMC-Issue on R64
> 
> Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC")
> Tested-By: Frank Wunderlich <frank-w@public-files.de>
> 
> and it needs to be fixed at least for 5.4+, so adding stable-CC
> 
> Cc: stable@vger.kernel.org

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
  2020-08-12  9:37   ` Wenbin Mei
  (?)
@ 2020-08-12 12:03     ` Philipp Zabel
  -1 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:03 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, linux-mmc, devicetree,
	linux-arm-kernel, linux-mediatek, linux-kernel, srv_heupstream

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> Add description for resets/reset-names.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> index 8a532f4453f2..35da72de7aac 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> @@ -49,6 +49,8 @@ Optional properties:
>  		     error caused by stop clock(fifo full)
>  		     Valid range = [0:0x7]. if not present, default value is 0.
>  		     applied to compatible "mediatek,mt2701-mmc".
> +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> +- reset-names: Reset names for MSDC.

I think the reset-names documentation should mention the actual value
the driver should look for, "hrst".

regards
Philipp

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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12 12:03     ` Philipp Zabel
  0 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:03 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, Chaotian Jing, Matthias Brugger,
	linux-arm-kernel

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> Add description for resets/reset-names.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> index 8a532f4453f2..35da72de7aac 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> @@ -49,6 +49,8 @@ Optional properties:
>  		     error caused by stop clock(fifo full)
>  		     Valid range = [0:0x7]. if not present, default value is 0.
>  		     applied to compatible "mediatek,mt2701-mmc".
> +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> +- reset-names: Reset names for MSDC.

I think the reset-names documentation should mention the actual value
the driver should look for, "hrst".

regards
Philipp

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12 12:03     ` Philipp Zabel
  0 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:03 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, Chaotian Jing, Matthias Brugger,
	linux-arm-kernel

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> Add description for resets/reset-names.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> index 8a532f4453f2..35da72de7aac 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> @@ -49,6 +49,8 @@ Optional properties:
>  		     error caused by stop clock(fifo full)
>  		     Valid range = [0:0x7]. if not present, default value is 0.
>  		     applied to compatible "mediatek,mt2701-mmc".
> +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> +- reset-names: Reset names for MSDC.

I think the reset-names documentation should mention the actual value
the driver should look for, "hrst".

regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
  2020-08-12  9:37   ` Wenbin Mei
  (?)
@ 2020-08-12 12:08     ` Philipp Zabel
  -1 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:08 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: Chaotian Jing, Matthias Brugger, linux-mmc, devicetree,
	linux-arm-kernel, linux-mediatek, linux-kernel, srv_heupstream

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 39e7fc54c438..2b243c03c9b2 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -22,6 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
>  #include <linux/interrupt.h>
> +#include <linux/reset.h>
>  
>  #include <linux/mmc/card.h>
>  #include <linux/mmc/core.h>
> @@ -434,6 +435,7 @@ struct msdc_host {
>  	struct msdc_save_para save_para; /* used when gate HCLK */
>  	struct msdc_tune_para def_tune_para; /* default tune setting */
>  	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
> +	struct reset_control *reset;
>  };
>  
>  static const struct mtk_mmc_compatible mt8135_compat = {
> @@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
>  	u32 val;
>  	u32 tune_reg = host->dev_comp->pad_tune_reg;
>  
> +	if (!IS_ERR(host->reset)) {
> +		reset_control_assert(host->reset);
> +		usleep_range(10, 50);
> +		reset_control_deassert(host->reset);
> +	}
> +

This should be:

	if (host->reset) {
		reset_control_assert(host->reset);
		usleep_range(10, 50);
		reset_control_deassert(host->reset);
	}

>  	/* Configure to MMC/SD mode, clock free running */
>  	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
>  
> @@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
>  	if (IS_ERR(host->src_clk_cg))
>  		host->src_clk_cg = NULL;
>  
> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
> +								"hrst");
> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
> +		return PTR_ERR(host->reset);
> +

This should be:

	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
								"hrst");
	if (IS_ERR(host->reset))
		return PTR_ERR(host->reset);

If the reset is configured in DT then it should be used, even if the
reset driver is loaded later.

If the DT does not contain the reset-names = "hrst" property at all,
devm_reset_control_get_optional_*() will return NULL.

With these two changes,

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 12:08     ` Philipp Zabel
  0 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:08 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, Chaotian Jing, Matthias Brugger,
	linux-arm-kernel

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 39e7fc54c438..2b243c03c9b2 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -22,6 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
>  #include <linux/interrupt.h>
> +#include <linux/reset.h>
>  
>  #include <linux/mmc/card.h>
>  #include <linux/mmc/core.h>
> @@ -434,6 +435,7 @@ struct msdc_host {
>  	struct msdc_save_para save_para; /* used when gate HCLK */
>  	struct msdc_tune_para def_tune_para; /* default tune setting */
>  	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
> +	struct reset_control *reset;
>  };
>  
>  static const struct mtk_mmc_compatible mt8135_compat = {
> @@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
>  	u32 val;
>  	u32 tune_reg = host->dev_comp->pad_tune_reg;
>  
> +	if (!IS_ERR(host->reset)) {
> +		reset_control_assert(host->reset);
> +		usleep_range(10, 50);
> +		reset_control_deassert(host->reset);
> +	}
> +

This should be:

	if (host->reset) {
		reset_control_assert(host->reset);
		usleep_range(10, 50);
		reset_control_deassert(host->reset);
	}

>  	/* Configure to MMC/SD mode, clock free running */
>  	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
>  
> @@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
>  	if (IS_ERR(host->src_clk_cg))
>  		host->src_clk_cg = NULL;
>  
> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
> +								"hrst");
> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
> +		return PTR_ERR(host->reset);
> +

This should be:

	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
								"hrst");
	if (IS_ERR(host->reset))
		return PTR_ERR(host->reset);

If the reset is configured in DT then it should be used, even if the
reset driver is loaded later.

If the DT does not contain the reset-names = "hrst" property at all,
devm_reset_control_get_optional_*() will return NULL.

With these two changes,

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 12:08     ` Philipp Zabel
  0 siblings, 0 replies; 36+ messages in thread
From: Philipp Zabel @ 2020-08-12 12:08 UTC (permalink / raw)
  To: Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-mediatek, Chaotian Jing, Matthias Brugger,
	linux-arm-kernel

On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> This patch adds a optional reset management for msdc.
> Sometimes the bootloader does not bring msdc register
> to default state, so need reset the msdc controller.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
>  drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 39e7fc54c438..2b243c03c9b2 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -22,6 +22,7 @@
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
>  #include <linux/interrupt.h>
> +#include <linux/reset.h>
>  
>  #include <linux/mmc/card.h>
>  #include <linux/mmc/core.h>
> @@ -434,6 +435,7 @@ struct msdc_host {
>  	struct msdc_save_para save_para; /* used when gate HCLK */
>  	struct msdc_tune_para def_tune_para; /* default tune setting */
>  	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
> +	struct reset_control *reset;
>  };
>  
>  static const struct mtk_mmc_compatible mt8135_compat = {
> @@ -1516,6 +1518,12 @@ static void msdc_init_hw(struct msdc_host *host)
>  	u32 val;
>  	u32 tune_reg = host->dev_comp->pad_tune_reg;
>  
> +	if (!IS_ERR(host->reset)) {
> +		reset_control_assert(host->reset);
> +		usleep_range(10, 50);
> +		reset_control_deassert(host->reset);
> +	}
> +

This should be:

	if (host->reset) {
		reset_control_assert(host->reset);
		usleep_range(10, 50);
		reset_control_deassert(host->reset);
	}

>  	/* Configure to MMC/SD mode, clock free running */
>  	sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
>  
> @@ -2273,6 +2281,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
>  	if (IS_ERR(host->src_clk_cg))
>  		host->src_clk_cg = NULL;
>  
> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
> +								"hrst");
> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
> +		return PTR_ERR(host->reset);
> +

This should be:

	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
								"hrst");
	if (IS_ERR(host->reset))
		return PTR_ERR(host->reset);

If the reset is configured in DT then it should be used, even if the
reset driver is loaded later.

If the DT does not contain the reset-names = "hrst" property at all,
devm_reset_control_get_optional_*() will return NULL.

With these two changes,

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
  2020-08-12 12:03     ` Philipp Zabel
  (?)
@ 2020-08-12 13:03       ` Wenbin Mei
  -1 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 13:03 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Ulf Hansson, Rob Herring, Chaotian Jing, Matthias Brugger,
	linux-mmc, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, srv_heupstream

Thanks for your reply.
I have changed this in v2 patch.
On Wed, 2020-08-12 at 14:03 +0200, Philipp Zabel wrote:
> On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> > Add description for resets/reset-names.
> > 
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > index 8a532f4453f2..35da72de7aac 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > @@ -49,6 +49,8 @@ Optional properties:
> >  		     error caused by stop clock(fifo full)
> >  		     Valid range = [0:0x7]. if not present, default value is 0.
> >  		     applied to compatible "mediatek,mt2701-mmc".
> > +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> > +- reset-names: Reset names for MSDC.
> 
> I think the reset-names documentation should mention the actual value
> the driver should look for, "hrst".
> 
> regards
> Philipp


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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12 13:03       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 13:03 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	Rob Herring, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chaotian Jing

Thanks for your reply.
I have changed this in v2 patch.
On Wed, 2020-08-12 at 14:03 +0200, Philipp Zabel wrote:
> On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> > Add description for resets/reset-names.
> > 
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > index 8a532f4453f2..35da72de7aac 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > @@ -49,6 +49,8 @@ Optional properties:
> >  		     error caused by stop clock(fifo full)
> >  		     Valid range = [0:0x7]. if not present, default value is 0.
> >  		     applied to compatible "mediatek,mt2701-mmc".
> > +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> > +- reset-names: Reset names for MSDC.
> 
> I think the reset-names documentation should mention the actual value
> the driver should look for, "hrst".
> 
> regards
> Philipp

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings
@ 2020-08-12 13:03       ` Wenbin Mei
  0 siblings, 0 replies; 36+ messages in thread
From: Wenbin Mei @ 2020-08-12 13:03 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: devicetree, Ulf Hansson, srv_heupstream, linux-mmc, linux-kernel,
	Rob Herring, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chaotian Jing

Thanks for your reply.
I have changed this in v2 patch.
On Wed, 2020-08-12 at 14:03 +0200, Philipp Zabel wrote:
> On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
> > Add description for resets/reset-names.
> > 
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > index 8a532f4453f2..35da72de7aac 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
> > @@ -49,6 +49,8 @@ Optional properties:
> >  		     error caused by stop clock(fifo full)
> >  		     Valid range = [0:0x7]. if not present, default value is 0.
> >  		     applied to compatible "mediatek,mt2701-mmc".
> > +- resets: Phandle and reset specifier pair to softreset line of MSDC IP.
> > +- reset-names: Reset names for MSDC.
> 
> I think the reset-names documentation should mention the actual value
> the driver should look for, "hrst".
> 
> regards
> Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
  2020-08-12 12:08     ` Philipp Zabel
  (?)
@ 2020-08-12 19:59       ` Frank Wunderlich
  -1 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 19:59 UTC (permalink / raw)
  To: linux-mediatek, Philipp Zabel, Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	Chaotian Jing, Matthias Brugger, linux-arm-kernel

Tested with these 2 changes below too.

Am 12. August 2020 14:08:19 MESZ schrieb Philipp Zabel <p.zabel@pengutronix.de>:

>> +	if (!IS_ERR(host->reset)) {
>> +		reset_control_assert(host->reset);
>> +		usleep_range(10, 50);
>> +		reset_control_deassert(host->reset);
>> +	}
>> +
>
>This should be:
>
>	if (host->reset) {
>		reset_control_assert(host->reset);
>		usleep_range(10, 50);
>		reset_control_deassert(host->reset);
>	}
>

>> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>> +								"hrst");
>> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
>> +		return PTR_ERR(host->reset);
>> +
>
>This should be:
>
>	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>								"hrst");
>	if (IS_ERR(host->reset))
>		return PTR_ERR(host->reset);
>

>With these two changes,
>
>Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards Frank

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 19:59       ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 19:59 UTC (permalink / raw)
  To: linux-mediatek, Philipp Zabel, Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-arm-kernel, Matthias Brugger, Chaotian Jing

Tested with these 2 changes below too.

Am 12. August 2020 14:08:19 MESZ schrieb Philipp Zabel <p.zabel@pengutronix.de>:

>> +	if (!IS_ERR(host->reset)) {
>> +		reset_control_assert(host->reset);
>> +		usleep_range(10, 50);
>> +		reset_control_deassert(host->reset);
>> +	}
>> +
>
>This should be:
>
>	if (host->reset) {
>		reset_control_assert(host->reset);
>		usleep_range(10, 50);
>		reset_control_deassert(host->reset);
>	}
>

>> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>> +								"hrst");
>> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
>> +		return PTR_ERR(host->reset);
>> +
>
>This should be:
>
>	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>								"hrst");
>	if (IS_ERR(host->reset))
>		return PTR_ERR(host->reset);
>

>With these two changes,
>
>Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards Frank

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 3/3] mmc: mediatek: add optional module reset property
@ 2020-08-12 19:59       ` Frank Wunderlich
  0 siblings, 0 replies; 36+ messages in thread
From: Frank Wunderlich @ 2020-08-12 19:59 UTC (permalink / raw)
  To: linux-mediatek, Philipp Zabel, Wenbin Mei, Ulf Hansson, Rob Herring
  Cc: devicetree, srv_heupstream, linux-mmc, linux-kernel,
	linux-arm-kernel, Matthias Brugger, Chaotian Jing

Tested with these 2 changes below too.

Am 12. August 2020 14:08:19 MESZ schrieb Philipp Zabel <p.zabel@pengutronix.de>:

>> +	if (!IS_ERR(host->reset)) {
>> +		reset_control_assert(host->reset);
>> +		usleep_range(10, 50);
>> +		reset_control_deassert(host->reset);
>> +	}
>> +
>
>This should be:
>
>	if (host->reset) {
>		reset_control_assert(host->reset);
>		usleep_range(10, 50);
>		reset_control_deassert(host->reset);
>	}
>

>> +	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>> +								"hrst");
>> +	if (PTR_ERR(host->reset) == -EPROBE_DEFER)
>> +		return PTR_ERR(host->reset);
>> +
>
>This should be:
>
>	host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
>								"hrst");
>	if (IS_ERR(host->reset))
>		return PTR_ERR(host->reset);
>

>With these two changes,
>
>Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards Frank

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-08-12 20:06 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  9:37 [PATCH 0/3] mmc: mediatek: add optional module reset property mmc: mediatek: add optional module reset property arm64: dts: mt7622: add reset node for mmc device Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++ arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 ++ drivers/mmc/host/mtk-sd.c | 13 +++++++++++++ 3 files changed, 17 insertions(+) Wenbin Mei
2020-08-12  9:37 ` Wenbin Mei
2020-08-12  9:37 ` Wenbin Mei
2020-08-12  9:37 ` [PATCH 1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12 12:03   ` Philipp Zabel
2020-08-12 12:03     ` Philipp Zabel
2020-08-12 12:03     ` Philipp Zabel
2020-08-12 13:03     ` Wenbin Mei
2020-08-12 13:03       ` Wenbin Mei
2020-08-12 13:03       ` Wenbin Mei
2020-08-12  9:37 ` [PATCH 2/3] arm64: dts: mt7622: add reset node for mmc device Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12 10:33   ` Aw: " Frank Wunderlich
2020-08-12 10:33     ` Frank Wunderlich
2020-08-12 10:33     ` Frank Wunderlich
2020-08-12 11:57     ` Wenbin Mei
2020-08-12 11:57       ` Wenbin Mei
2020-08-12 11:57       ` Wenbin Mei
2020-08-12  9:37 ` [PATCH 3/3] mmc: mediatek: add optional module reset property Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12  9:37   ` Wenbin Mei
2020-08-12 10:07   ` Aw: " Frank Wunderlich
2020-08-12 10:07     ` Frank Wunderlich
2020-08-12 10:07     ` Frank Wunderlich
2020-08-12 11:55     ` Wenbin Mei
2020-08-12 11:55       ` Wenbin Mei
2020-08-12 11:55       ` Wenbin Mei
2020-08-12 12:08   ` Philipp Zabel
2020-08-12 12:08     ` Philipp Zabel
2020-08-12 12:08     ` Philipp Zabel
2020-08-12 19:59     ` Frank Wunderlich
2020-08-12 19:59       ` Frank Wunderlich
2020-08-12 19:59       ` Frank Wunderlich

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.