Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-25 Thread Fleming Andy-AFLEMING
On Feb 24, 2011, at 23:35, "Wolfgang Denk" wrote: > Dear Andy Fleming, > > In message you > wrote: >> >> Yeah, that took me a while, too. Maybe we should update it to make clear: >> >> 1) The formula ends up being (2^(13 + timeout))/mmc->trans_speed = (1/4) >> seconds >> --> 2^(13 + time

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-25 Thread Wolfgang Denk
Dear Fleming Andy-AFLEMING, In message you wrote: > > > Does this not depend on the units used for speed, and thus in the end > > on CONFIC_SYS_HZ ? > > No, but that wasn't apparent because I didn't mention the units of > 2^(13+timeout). It is in units of sd clocks. > > So: num sd clocks = (sd

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-25 Thread Wolfgang Denk
Dear Jain Priyanka-B32167, In message <470db7ce2cd0944e9436e7adefc02fe3138...@039-sn1mpn1-003.039d.mgd.msft.net> you wrote: > > > > 1) The formula ends up being (2^(13 + timeout))/mmc->trans_speed =3D > > > (1/4) seconds > > > --> 2^(13 + timeout) = mmc->trans_speed/4 > > > --> 13 + timeout = l

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-25 Thread Jain Priyanka-B32167
Dear Wolgang Denk > -Original Message- > From: Wolfgang Denk [mailto:w...@denx.de] > Sent: Friday, February 25, 2011 11:06 AM > To: Andy Fleming > Cc: Kumar Gala; u-boot@lists.denx.de; Fleming Andy-AFLEMING; Jain > Priyanka-B32167 > Subject: Re: [U-Boot] [PATCH]

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Wolfgang Denk
Dear Andy Fleming, In message you wrote: > > Yeah, that took me a while, too. Maybe we should update it to make clear: > > 1) The formula ends up being (2^(13 + timeout))/mmc->trans_speed = (1/4) > seconds > --> 2^(13 + timeout) = mmc->trans_speed/4 > --> 13 + timeout = log2(mmc->trans_speed/4

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Andy Fleming
On Thu, Feb 24, 2011 at 3:50 AM, Wolfgang Denk wrote: > Dear Kumar Gala, > > In message <1298537614-20797-1-git-send-email-ga...@kernel.crashing.org> you > wrote: >> >> - Timeout counter value is set as DTOCV bits in SYSCTL register >>   For counter value set as x, >>   Timeout period = (2^(13+x)

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Stefano Babic
On 02/24/2011 11:37 AM, Kumar Gala wrote: > > On Feb 24, 2011, at 2:53 AM, Kumar Gala wrote: > >> From: Priyanka Jain >> >> - Timeout counter value is set as DTOCV bits in SYSCTL register >> For counter value set as x, >> Timeout period = (2^(13+x))/SD_CLOCK >> >> - As per 4.6.2.2 section of S

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Kumar Gala
On Feb 24, 2011, at 2:53 AM, Kumar Gala wrote: > From: Priyanka Jain > > - Timeout counter value is set as DTOCV bits in SYSCTL register > For counter value set as x, > Timeout period = (2^(13+x))/SD_CLOCK > > - As per 4.6.2.2 section of SD Card specification v2.00, host should > cofigure t

Re: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Wolfgang Denk
Dear Kumar Gala, In message <1298537614-20797-1-git-send-email-ga...@kernel.crashing.org> you wrote: > > - Timeout counter value is set as DTOCV bits in SYSCTL register > For counter value set as x, > Timeout period = (2^(13+x))/SD_CLOCK > > - As per 4.6.2.2 section of SD Card specification

[U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation

2011-02-24 Thread Kumar Gala
From: Priyanka Jain - Timeout counter value is set as DTOCV bits in SYSCTL register For counter value set as x, Timeout period = (2^(13+x))/SD_CLOCK - As per 4.6.2.2 section of SD Card specification v2.00, host should cofigure timeout period value to minimum 250 msec. - SD_CLOCK = mmc->tr