Message ID | 565F3CD3.1010100@nelint.com |
---|---|
State | RFC |
Headers | show |
Hi Eric, On Wed, Dec 2, 2015 at 4:47 PM, Eric Nelson <eric@nelint.com> wrote: > Sure. It's a hack, but shows where we're hitting the problem > (with the stop command). > > We haven't been using the "mmc erase" command, but see this when > using ums to program eMMC. Ok, applied your patch, but still get: => mmc erase 4000 1000 MMC erase: dev # 2, block # 16384, count 4096 ... Timeout waiting for DAT0 to go high! mmc erase failed 0 blocks erased: ERROR => Thanks
Hi On Wed, Dec 2, 2015 at 7:52 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Eric, > > On Wed, Dec 2, 2015 at 4:47 PM, Eric Nelson <eric@nelint.com> wrote: >> Sure. It's a hack, but shows where we're hitting the problem >> (with the stop command). >> >> We haven't been using the "mmc erase" command, but see this when >> using ums to program eMMC. > > Ok, applied your patch, but still get: > > => mmc erase 4000 1000 > > MMC erase: dev # 2, block # 16384, count 4096 ... Timeout waiting for DAT0 to go > high! > mmc erase failed > 0 blocks erased: ERROR > => > Can you print the sysctl & 0xF? I want to check if this workaround is really applied Michael > Thanks > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot
Hi Michael, On Wed, Dec 2, 2015 at 5:37 PM, Michael Trimarchi <michael@amarulasolutions.com> wrote: > Can you print the sysctl & 0xF? I want to check if this workaround is > really applied In my testing I see the error with or without the ENGcm03648 workaround. Regards, Fabio Estevam
Hi On Wed, Dec 2, 2015 at 8:54 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Michael, > > On Wed, Dec 2, 2015 at 5:37 PM, Michael Trimarchi > <michael@amarulasolutions.com> wrote: > >> Can you print the sysctl & 0xF? I want to check if this workaround is >> really applied > > In my testing I see the error with or without the ENGcm03648 workaround. > Well the workaround works if the sysctl is 0xf on the last bits, because it needs the clocks enable according to the original description. http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=e436525a70fe47623d346bc7d9f08f12ff8ad787 So if you hit this timeout without having this set, I don't think it can work Michael > Regards, > > Fabio Estevam
Hi Michael, On 12/02/2015 01:00 PM, Michael Trimarchi wrote: > Hi > > On Wed, Dec 2, 2015 at 8:54 PM, Fabio Estevam <festevam@gmail.com> wrote: >> Hi Michael, >> >> On Wed, Dec 2, 2015 at 5:37 PM, Michael Trimarchi >> <michael@amarulasolutions.com> wrote: >> >>> Can you print the sysctl & 0xF? I want to check if this workaround is >>> really applied >> >> In my testing I see the error with or without the ENGcm03648 workaround. >> > > Well the workaround works if the sysctl is 0xf on the last bits, > because it needs the > clocks enable according to the original description. > > http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/drivers/mmc/imx_esdhc.c?h=imx_v2009.08_12.01.01&id=e436525a70fe47623d346bc7d9f08f12ff8ad787 > > So if you hit this timeout without having this set, I don't think it can work > I think you're onto something. According to the i.MX35 reference manual, which I think was the origin of this patch, the low four bits of the SYSCTL register of the SDHC5 3 - SDCLKEN 2 - PEREN 1 - HCKEN 0 - IPGEN See page 603 of http://cache.freescale.com/files/dsp/doc/ref_manual/IMX35RM.pdf But in the i.MX6 reference manual, the low four bits are reserved and say "Always write as 1". See pages 5679-5680 of http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf It appears that when this patch was ported from the Freescale version, the test for "is_usdhc" was lost. http://git.denx.de/?p=u-boot.git;a=commitdiff;h=7a5b80297bc6cef0c10e5f57ac0450678dc7bc5e
From e647278657e32f74833eadc5f2cbe4d121c22842 Mon Sep 17 00:00:00 2001 From: Eric Nelson <eric@nelint.com> Date: Tue, 17 Nov 2015 15:35:32 -0700 Subject: [PATCH] mmc: try to continue after failure in stop command --- drivers/mmc/mmc.c | 3 +-- drivers/mmc/mmc_write.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 2a58702..53084a7 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -225,9 +225,8 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start, cmd.resp_type = MMC_RSP_R1b; if (mmc_send_cmd(mmc, &cmd, NULL)) { #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) - printf("mmc fail to send stop cmd\n"); + printf("%s: mmc fail to send stop cmd\n", __func__); #endif - return 0; } } diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index 7aea7e9..a417d25 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -153,8 +153,7 @@ static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, cmd.cmdarg = 0; cmd.resp_type = MMC_RSP_R1b; if (mmc_send_cmd(mmc, &cmd, NULL)) { - printf("mmc fail to send stop cmd\n"); - return 0; + printf("%s: mmc fail to send stop cmd\n", __func__); } } -- libgit2 0.21.2