From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 7 Apr 2010 11:32:53 +0200 Subject: [U-Boot] [PATCH v2] cfi_flash: reset timer in flash status check In-Reply-To: <1270091705-22932-1-git-send-email-thomas@wytron.com.tw> References: <1270091497-22877-1-git-send-email-thomas@wytron.com.tw> <1270091705-22932-1-git-send-email-thomas@wytron.com.tw> Message-ID: <201004071132.53943.sr@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 On Thursday 01 April 2010 05:15:05 Thomas Chou wrote: > This patch adds reset_timer() before the flash status check > waiting loop. > > Since the timer is basically running asynchronous to the cfi > code, it is possible to call get_timer(0), then only a few > _SYSCLK_ cycles later an interrupt is generated. This causes > timeout even though much less time has elapsed. So the timer > period registers should be reset before get_timer(0) is > called. > > There is similar usage in nand_base.c. Applied to u-boot-cfi-flash/master. Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de