u-boot-brain/drivers/mmc
Priyanka Jain b71ea33699 fsl_esdhc: Correcting esdhc timeout counter calculation
- Timeout counter value is set as DTOCV bits in SYSCTL register
  For counter value set as timeout,
  Timeout period = (2^(timeout + 13)) SD Clock cycles

- As per 4.6.2.2 section of SD Card specification v2.00, host should
  cofigure timeout period value to minimum 0.25 sec.

- Number of SD Clock cycles for 0.25sec should be minimum
	(SD Clock/sec * 0.25 sec) SD Clock cycles
	= (mmc->tran_speed * 1/4) SD Clock cycles

- Calculating timeout based on
	(2^(timeout + 13)) >=  mmc->tran_speed * 1/4
	Taking log2 both the sides and rounding up to next power of 2
	=> timeout + 13 = log2(mmc->tran_speed/4) + 1

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-03-07 08:49:28 -06:00
..
atmel_mci.c Convert mmc_init to mmc_legacy_init 2009-02-16 18:07:40 -06:00
atmel_mci.h AT91: MCI: add SD/MMC driver using mmc framework 2010-09-03 11:19:01 +02:00
bfin_sdh.c Blackfin: bfin_sdh: clean up send_cmd 2010-10-02 16:00:37 -04:00
davinci_mmc.c Minor Coding Style Cleanup. 2011-02-02 22:36:10 +01:00
fsl_esdhc.c fsl_esdhc: Correcting esdhc timeout counter calculation 2011-03-07 08:49:28 -06:00
gen_atmel_mci.c AT91: gen_atmel_mci.c: fix bug when Slot B is used 2010-12-07 16:36:39 +01:00
Makefile Davinci MMCSD Support 2011-02-02 00:54:44 +01:00
mmc.c mmc: Add multi-block read support to the generic mmc driver 2010-11-04 15:27:25 -04:00
mxcmmc.c mxcmmc: fix warnings due to access 32 bit registers with 16 bit accessors 2010-03-21 22:22:52 +01:00
omap3_mmc.c mmc: omap3: fix block read function 2010-08-12 13:50:25 -04:00
omap3_mmc.h mmc: omap3: make local symbols static 2010-08-12 13:50:19 -04:00
omap_hsmmc.c mmc: omap: timeout counter fix 2010-11-19 16:27:37 -05:00
pxa_mmc.c PXA: pxa-regs.h cleanup 2010-10-19 22:46:22 +02:00
pxa_mmc.h pxa: move mmc drivers to drivers/mmc 2009-02-20 03:47:50 +01:00
s5p_mmc.c s5p_mmc: support 8-bit bus width 2010-10-19 11:34:54 +09:00