@@ -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
From: Wenbin Mei <hidden> Date: 2020-08-12 09:38:38
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 <redacted>
---
drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
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 <redacted>
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 <redacted>
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
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 <redacted>
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 <redacted>
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
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 <redacted>
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 <redacted>
and it needs to be fixed at least for 5.4+, so adding stable-CC
Cc: stable@vger.kernel.org
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 <redacted>
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 <redacted>
and it needs to be fixed at least for 5.4+, so adding stable-CC
Cc: stable@vger.kernel.org
@@ -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
From: Philipp Zabel <p.zabel@pengutronix.de> Date: 2020-08-12 12:08:28
On Wed, 2020-08-12 at 17:37 +0800, Wenbin Mei wrote:
quoted hunk
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 <redacted>
---
drivers/mmc/host/mtk-sd.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
@@ -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
@@ -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