From: Wolfgang Denk Date: Fri, 25 Feb 2011 06:35:44 +0100 Subject: [U-Boot] [PATCH] fsl_esdhc: Correcting esdhc timeout counter calculation In-Reply-To: References: <1298537614-20797-1-git-send-email-galak@kernel.crashing.org> <20110224095010.1BE16146940@gemini.denx.de> Message-ID: <20110225053544.EF54FB34A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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) > ...etc Does this not depend on the units used for speed, and thus in the end on CONFIC_SYS_HZ ? 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: wd at 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