From: Wolfgang Denk Date: Tue, 03 Nov 2009 14:27:12 +0100 Subject: [U-Boot] [PATCH (repost)] Nomadik: fix reset_timer() In-Reply-To: <20091103121250.GA8577@mail.gnudd.com> References: <20091103121250.GA8577@mail.gnudd.com> Message-ID: <20091103132712.950203F6EC@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 Alessandro Rubini, In message <20091103121250.GA8577@mail.gnudd.com> you wrote: > From: Alessandro Rubini > > 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 > Acked-by: Andrea Gallo > --- > > 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