mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/Solo
Subsystems (4)
PATCH 1/1 mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/Solo
The ROM Code of i.MX6 Quad/Dual uses the MMC interfaces differently than the i.MX6 Solo/DualLite when it loads the bootloader from the interface:
Register DLL_CTRL(0x60) Bit 25 FBCLK_SEL (0x48)
Quad: 0x0 0
DualLite: 0x01000021 1Since the linux kernel or bootloader driver doesn't reset all registers, the MMC interface is in an inconsistent state, which leads to boot failures for some eMMC devices on the i.MX6 DualLite SoC. The errors look like:
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
mmcblk1: retrying using single block read
mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response 0x900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 2
mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response 0x900, card status 0x0
blk_update_request: I/O error, dev mmcblk1, sector 3
The register DLL_CTRL is already reset. Reset also the bit FBCLK_SEL.
---
Hi,
this patch is a follow up to
http://www.spinics.net/lists/linux-mmc/msg36331.html
mmc: sdhci-esdhci-imx: disable DLL delay line settings explicitly
Disable DLL delay line settings explicitly during driver initialization in case ROM/uBoot had set an invalid delay.
e.g. MX6DL ROM has set the default delay line(DLLCTRL) to 0x1000021, the uSDHC clock timing will become marginal when works on DDR mode due to default delay and will possibly see CRC errors in case the board is not perfectly designed on the eMMC chip layout.
It doesn't apply cleanly on Linus master branch, since the above patch is missing.
Mit freundlichen Grüßen / Kind regards,
Stefan Christ
--- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/sdhci-esdhc-imx.c +4 -0
@@ -1191,6 +1191,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)/* disable DLL_CTRL delay line settings */ writel (0x0 , host->ioaddr +ESDHC_DLL_CTRL ); + +/* reset bit FBCLK_SEL for i.MX6 Solo/DualLite ROM code */ +writel (readl (host->ioaddr +ESDHC_MIX_CTRL ) & ~BIT (25 ), + host->ioaddr +ESDHC_MIX_CTRL ); }if (imx_data->socdata->flags &ESDHC_FLAG_MAN_TUNING )
Signature · 1 line
1.9.1
Haibo Chen
maintainerQuoted 35 lines
-----Original Message-----
From: [email protected] [mailto:linux-mmc- [email protected]] On Behalf Of Stefan Christ
Sent: Thursday, May 12, 2016 7:53 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/SoloThe ROM Code of i.MX6 Quad/Dual uses the MMC interfaces differently than the i.MX6 Solo/DualLite when it loads the bootloader from the interface:
Register DLL_CTRL(0x60) Bit 25 FBCLK_SEL (0x48) Quad: 0x0 0 DualLite: 0x01000021 1Since the linux kernel or bootloader driver doesn't reset all registers, the MMC interface is in an inconsistent state, which leads to boot failures for some eMMC devices on the i.MX6 DualLite SoC. The errors look like:
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, cardstatus
0xb00
mmcblk1: retrying using single block read
mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 2
mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 3The register
DLL_CTRLis already reset. Reset also the bitFBCLK_SEL.
Quoted 7 lines
Signed-off-by Stefan Christ <[email protected]>---
Hi,this patch is a follow up to
http://www.spinics.net/lists/linux-mmc/msg36331.html
Hi Stefan,
Aisheng also take this into consideration, please refer to
http://www.spinics.net/lists/linux-mmc/msg36940.html
Seems this patch still not be in Ulf's branch.
Regards,
Haibo
Quoted 44 lines
mmc: sdhci-esdhci-imx: disable DLL delay line settings explicitly
Disable DLL delay line settings explicitly during driver initialization in case ROM/uBoot had set an invalid delay.
e.g. MX6DL ROM has set the default delay line(DLLCTRL) to0x1000021, the uSDHC clock timing will become marginal when works on DDR mode due to default delay and will possibly see CRC errors in case the board is not perfectly designed on the eMMC chip layout.Signed-off-by Dong Aisheng <aisheng.dong@xxxxxxx>It doesn't apply cleanly on Linus master branch, since the above patch is missing.
Mit freundlichen Grüßen / Kind regards,
Stefan Christ--- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/sdhci- renamed from drivers/mmc/host/sdhci-esdhc-imx.c +0
-0
esdhc-imx.c
index 4490808..9101556 100644drivers/mmc/host/sdhci-esdhc-imx.c +4
-0@@ -1191,6 +1191,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)/* disable DLL_CTRL delay line settings */ writel(0x0, host->ioaddr + ESDHC_DLL_CTRL); + +/* reset bit FBCLK_SEL for i.MX6 Solo/DualLite ROM code */ +writel (readl (host->ioaddr +ESDHC_MIX_CTRL ) & ~BIT (25 ), + host->ioaddr +ESDHC_MIX_CTRL ); }if (
imx_data->socdata->flags&ESDHC_FLAG_MAN_TUNING)
--
1.9.1--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Hi Haibo,
Quoted 43 lines · Haibo Chen
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:linux-mmc- [email protected]] On Behalf Of Stefan Christ
Sent: Thursday, May 12, 2016 7:53 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/SoloThe ROM Code of i.MX6 Quad/Dual uses the MMC interfaces differently than the i.MX6 Solo/DualLite when it loads the bootloader from the interface:
Register DLL_CTRL(0x60) Bit 25 FBCLK_SEL (0x48) Quad: 0x0 0 DualLite: 0x01000021 1Since the linux kernel or bootloader driver doesn't reset all registers, the MMC interface is in an inconsistent state, which leads to boot failures for some eMMC devices on the i.MX6 DualLite SoC. The errors look like:
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, cardstatus
0xb00
mmcblk1: retrying using single block read
mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 2
mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 3The register
DLL_CTRLis already reset. Reset also the bitFBCLK_SEL.Quoted 7 lines
Signed-off-by Stefan Christ <[email protected]>---
Hi,this patch is a follow up to
http://www.spinics.net/lists/linux-mmc/msg36331.htmlHi Stefan,
Aisheng also take this into consideration, please refer to
Quoted 6 lines
http://www.spinics.net/lists/linux-mmc/msg36940.htmlSeems this patch still not be in Ulf's branch.
Regards,
Haibo
Please correct me if I'm wrong, but I don't see any activity about this issue on the mailing list. Is it possible to pick Aisheng's and my patch without waiting for the whole series to be reworked?
Mit freundlichen Grüßen / Kind regards,
Stefan Christ
Quoted 44 lines
Quoted 44 lines
mmc: sdhci-esdhci-imx: disable DLL delay line settings explicitly
Disable DLL delay line settings explicitly during driver initialization in case ROM/uBoot had set an invalid delay.
e.g. MX6DL ROM has set the default delay line(DLLCTRL) to0x1000021, the uSDHC clock timing will become marginal when works on DDR mode due to default delay and will possibly see CRC errors in case the board is not perfectly designed on the eMMC chip layout.Signed-off-by Dong Aisheng <aisheng.dong@xxxxxxx>It doesn't apply cleanly on Linus master branch, since the above patch is missing.
Mit freundlichen Grüßen / Kind regards,
Stefan Christ--- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/sdhci- renamed from drivers/mmc/host/sdhci-esdhc-imx.c +0
-0
esdhc-imx.c
index 4490808..9101556 100644drivers/mmc/host/sdhci-esdhc-imx.c +4
-0@@ -1191,6 +1191,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)/* disable DLL_CTRL delay line settings */ writel(0x0, host->ioaddr + ESDHC_DLL_CTRL); + +/* reset bit FBCLK_SEL for i.MX6 Solo/DualLite ROM code */ +writel (readl (host->ioaddr +ESDHC_MIX_CTRL ) & ~BIT (25 ), + host->ioaddr +ESDHC_MIX_CTRL ); }if (
imx_data->socdata->flags&ESDHC_FLAG_MAN_TUNING)
--
1.9.1--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Hi Stefan,
Quoted 48 lines · Stefan Christ
Hi Haibo,
Quoted 45 lines · Haibo Chen
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:linux-mmc- [email protected]] On Behalf Of Stefan Christ
Sent: Thursday, May 12, 2016 7:53 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] mmc: sdhci-esdhc-imx: implement reset quirks for i.MX6 DualLite/SoloThe ROM Code of i.MX6 Quad/Dual uses the MMC interfaces differently than the i.MX6 Solo/DualLite when it loads the bootloader from the interface:
Register DLL_CTRL(0x60) Bit 25 FBCLK_SEL (0x48) Quad: 0x0 0 DualLite: 0x01000021 1Since the linux kernel or bootloader driver doesn't reset all registers, the MMC interface is in an inconsistent state, which leads to boot failures for some eMMC devices on the i.MX6 DualLite SoC. The errors look like:
mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, cardstatus
0xb00
mmcblk1: retrying using single block read
mmcblk1: error -84 transferring data, sector 2, nr 6, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 2
mmcblk1: error -84 transferring data, sector 3, nr 5, cmd response0x900, card
status0x0
blk_update_request: I/O error, dev mmcblk1, sector 3The register
DLL_CTRLis already reset. Reset also the bitFBCLK_SEL.Quoted 7 lines
Signed-off-by Stefan Christ <[email protected]>---
Hi,this patch is a follow up to
http://www.spinics.net/lists/linux-mmc/msg36331.htmlHi Stefan,
Aisheng also take this into consideration, please refer tohttp://www.spinics.net/lists/linux-mmc/msg36940.html
Quoted 9 lines
Quoted 4 lines
Seems this patch still not be in Ulf's branch.
Regards,
HaiboPlease correct me if I'm wrong, but I don't see any activity about this issue on the mailing list. Is it possible to pick Aisheng's and my patch without waiting for the whole series to be reworked?
Sorry for the delay.
I'm busy with other issues and will send V2 soon this days. Most of them already got ack from Andrian.
Suppose they will be in soon.
Regards
Dong Aisheng
Quoted 51 lines
Mit freundlichen Grüßen / Kind regards,
Stefan ChristQuoted 36 lines
Quoted 36 lines
mmc: sdhci-esdhci-imx: disable DLL delay line settings explicitly
Disable DLL delay line settings explicitly during driver initialization in case ROM/uBoot had set an invalid delay.
e.g. MX6DL ROM has set the default delay line(DLLCTRL) to0x1000021, the uSDHC clock timing will become marginal when works on DDR mode due to default delay and will possibly see CRC errors in case the board is not perfectly designed on the eMMC chip layout.Signed-off-by Dong Aisheng <aisheng.dong@xxxxxxx>It doesn't apply cleanly on Linus master branch, since the above patch is missing.
Mit freundlichen Grüßen / Kind regards,
Stefan Christ--- drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/sdhci- renamed from drivers/mmc/host/sdhci-esdhc-imx.c +0
-0
esdhc-imx.c
index 4490808..9101556 100644drivers/mmc/host/sdhci-esdhc-imx.c +4
-0@@ -1191,6 +1191,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)/* disable DLL_CTRL delay line settings */ writel(0x0, host->ioaddr + ESDHC_DLL_CTRL); + +/* reset bit FBCLK_SEL for i.MX6 Solo/DualLite ROM code */ +writel (readl (host->ioaddr +ESDHC_MIX_CTRL ) & ~BIT (25 ), + host->ioaddr +ESDHC_MIX_CTRL ); }Quoted 8 lines
Quoted 8 lines
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)--
1.9.1--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html