[U-Boot] [PATCH (repost)] Nomadik: fix reset_timer()

Wolfgang Denk wd at denx.de
Tue Nov 3 14:27:12 CET 2009


Dear Alessandro Rubini,

In message <20091103121250.GA8577 at mail.gnudd.com> you wrote:
> From: Alessandro Rubini <rubini at unipv.it>
> 
> The timer decrements and READ_TIMER() negates the value read.
> Writing 0 in reset_timer() is this wrong, as a readback before 400us
> will read back 0 and will report 1780 seconds, so nand operations did
> timeout.  This patch writes ~0 in reset_timer to prevent this.
> 
> Signed-off-by: Alessandro Rubini <rubini at unipv.it>
> Acked-by: Andrea Gallo <andrea.gallo at stericsson.com>
> ---
> 
> This must be applied for nand to work. It's a simple bugfix so
> I think it got simply forgotten.

Um... why is READ_TIMER doing such a stupid thing as negating values?
This is not what it is supposed to do - as the name says, it should
_read_ the _timer_. There is no mentioning of "NEgATE" anywhere?

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 majority of the stupid is  invincible  and  guaranteed  for  all
time.  The  terror  of their tyranny, however, is alleviated by their
lack of consistency."                               - Albert Einstein


More information about the U-Boot mailing list