summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPriyanka Jain <[email protected]>2011-03-03 09:18:56 +0530
committerKumar Gala <[email protected]>2011-03-07 08:49:28 -0600
commitb71ea33699bb694964929e2cdced80ef794bde69 (patch)
treeaadaa4c2e5edd0b040c629286fdf16636c736f9d /common
parent509e19cab43ba38311749eba5ceebd806116ce38 (diff)
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 <[email protected]> Signed-off-by: Andy Fleming <[email protected]> Acked-by: Mingkai Hu <[email protected]> Tested-by: Stefano Babic <[email protected]> Signed-off-by: Kumar Gala <[email protected]>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions