[U-Boot] [PATCH] nand_base: Add timeout for NAND reset command

Peter Tyser ptyser at xes-inc.com
Wed Feb 4 22:29:27 CET 2009


On Wed, 2009-02-04 at 22:22 +0100, Wolfgang Denk wrote:
> Dear Scott Wood,
> 
> In message <4989FE57.80404 at freescale.com> you wrote:
> > 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?
> 
> get_ticks() not a public interface. It should not be used in any
> common code.
> 
> Please use get_timer().

The problem is that the NAND code is used prior to interrupts being
enabled, thus we can't use get_timer().  I used a hokey delay based on
(read times * number of iterations).  Whats worse, my hokey loop or
get_ticks()?

Thanks,
Peter



More information about the U-Boot mailing list