From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 04 Feb 2009 14:45:11 -0600 Subject: [U-Boot] [PATCH] nand_base: Add timeout for NAND reset command In-Reply-To: <1233778972.7067.261.camel@localhost.localdomain> References: <1233776842-23379-1-git-send-email-ptyser@xes-inc.com> <4989F25A.6090400@freescale.com> <1233778972.7067.261.camel@localhost.localdomain> Message-ID: <4989FE57.80404@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Peter Tyser wrote: > The 25ns was calculated based on the addition of trp and trhoh from the > Micron MT29F8G08 datasheet. Based on the timing diagram for a "Read > Status" cycle I thought this would be the minimum cycle time needed to > read the chip's status. Other chips (ST, Samsung) I glanced at had > 25 > ns read status times as well. > > I had tried using get_timer() (I believe nand_wait() would have been > perfect to use), but that didn't work due to interrupts being disabled > when NAND is probed. I didn't consider using get_ticks()... That seems > much better. Is get_ticks() available for all platforms when NAND is > initialized? Probably, but who knows what weirdness is out there. > Assuming get_ticks() is available for all platforms, would you prefer I: > 1. re-do the patch using get_ticks() > 2. update nand_wait() to use get_ticks instead of get_timer() and use it #2 looks better. -Scott