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] fsl_esdhc: Correcting esdhc timeout counter
> calculation
> 
> Dear Andy Fleming,
> 
> In message <AANLkTimCt=qipdc9s2bmyy4nm5r+jwcbiallnfo_w...@mail.gmail.com>
> 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)
> > ...etc
> 
> Does this not depend on the units used for speed, and thus in the end on
> CONFIC_SYS_HZ ?
> 
We are using absolute figures. So this code is independent of units of speed.
For standard speed cards, mmc->tran_speed is 25000000.
Code snippet(mmc.c) of setting tran_speed is:

        /* divide frequency by 10, since the mults are 10x bigger */
        freq = fbase[(cmd.response[0] & 0x7)];
        mult = multipliers[((cmd.response[0] >> 3) & 0xf)];
        mmc->tran_speed = freq * mult;

> Best regards,
> 
> Wolfgang Denk
> 
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The
> use of COBOL cripples the mind; its teaching  should,  therefore, be
> regarded as a criminal offence.
>           -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to