u-boot/drivers/mmc
Oleksandr Tyshchenko 61a6cc27bc omap_hsmmc: omap4+/am335x: modify MMC controller internal fsm reset func
"mmc_send_cmd: timeout: No status update" error sometimes happens in
omap_hsmmc driver func mmc_send_cmd() when the MMC controller card
identification and selection sequence is executed for eMMC on OMAP4
boards.

It happens due to incorrect execution of CMD line reset procedure
for OMAP4. Because CMD(DAT) lines reset procedures are slightly
different for OMAP3 and OMAP4(AM335x,OMAP5,DRA7xx).

According to OMAP3 TRM:
Set SRC(SRD) bit in MMCHS_SYSCTL register to 0x1 and wait until
it returns to 0x0.

According to OMAP4(AM335x,OMAP5,DRA7xx) TRMs, CMD(DATA) lines reset
procedure steps must be as follows:
1. Initiate CMD(DAT) line reset by writing 0x1 to SRC(SRD) bit in
   MMCHS_SYSCTL register (SD_SYSCTL for AM335x).
2. Poll the SRC(SRD) bit until it is set to 0x1.
3. Wait until the SRC(SRD) bit returns to 0x0
  (reset procedure is completed).

Unfortunately, at present omap_hsmmc driver has support only for
OMAP3. And as result step #2 is missing for OMAP4(AM335x,OMAP5,DRA7xx).
This sometimes leads to the fact that the waiting loop which is
required in step #3 does not executed, because SRC bit does not set
yet (at the moment of checking a condition of a loop execution).
And as a result this can cause to timeout error when sending a
next command.

In the particular case (working with eMMC witch do not respond to
some SD specific command) due to incorrect reset sequence after
command SD_CMD_SEND_IF_COND which finished with CTO flag within
64 clock cycles, the next command MMC_CMD_APP_CMD leads to a
timeout error within 1s.

So, extend CMD(DATA) lines reset procedure in func
mmc_reset_controller_fsm() by adding the missing step #2 for
OMAP4+/AM335x boards.

Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@ti.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2013-09-17 20:03:44 +03:00
..
arm_pl180_mmci.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arm_pl180_mmci.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bcm2835_sdhci.c ARM: bcm2835: fix get_timer() to return ms 2013-04-04 08:14:54 +02:00
bfin_sdh.c Merge u-boot/master into u-boot-ti/master 2013-03-11 12:16:13 -04:00
davinci_mmc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
dw_mmc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
exynos_dw_mmc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
fsl_esdhc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
fsl_esdhc_spl.c SPDX-License-Identifier: clean up license header 2013-08-20 10:15:37 -07:00
ftsdc010_mci.c Merge branch 'master' of git://git.denx.de/u-boot-nds32 2013-07-25 08:51:51 -04:00
gen_atmel_mci.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Makefile powerpc: mpc85xx: Support booting from SD Card with SPL 2013-08-20 09:47:26 -07:00
mmc.c mmc: Remove unused variable backup from mmc_send_cmd() 2013-09-17 20:03:44 +03:00
mmc_spi.c mmc: add support for write protection 2013-03-08 16:41:13 -05:00
mv_sdhci.c mmc: sdhci: return error when failed add_sdhci(). 2013-05-06 16:26:24 -05:00
mxcmmc.c mmc: add support for write protection 2013-03-08 16:41:13 -05:00
mxsmmc.c mmc: mxsmmc: Enable MMC HC support 2013-08-23 15:53:21 +02:00
omap_hsmmc.c omap_hsmmc: omap4+/am335x: modify MMC controller internal fsm reset func 2013-09-17 20:03:44 +03:00
pxa_mmc.h pxa: move mmc drivers to drivers/mmc 2009-02-20 03:47:50 +01:00
pxa_mmc_gen.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
s5p_sdhci.c mmc: sdhci: use the SDHCI_QUIRK_USE_WIDE8 for samsung SoC 2013-09-17 20:03:43 +03:00
sdhci.c mmc: sdhci: use the SDHCI_QUIRK_USE_WIDE8 for samsung SoC 2013-09-17 20:03:43 +03:00
sh_mmcif.c mmc: add support for write protection 2013-03-08 16:41:13 -05:00
sh_mmcif.h mmc: sh_mmcif: add support for Renesas MMCIF 2011-07-15 20:29:21 -05:00
spear_sdhci.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
tegra_mmc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
zynq_sdhci.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00