From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott McNutt Date: Mon, 23 May 2011 09:12:04 -0400 Subject: [U-Boot] [PATCH] [Timer]Remove calls to [get, reset]_timer outside arch/ In-Reply-To: <4DDA53C0.9090508@gmail.com> References: <1306151649-25640-1-git-send-email-graeme.russ@gmail.com> <4DDA50D8.6060601@psyent.com> <4DDA53C0.9090508@gmail.com> Message-ID: <4DDA5D24.2060200@psyent.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Graeme, Graeme Russ wrote: > On 23/05/11 22:19, Scott McNutt wrote: >> Hi Graeme, >> >> Graeme Russ wrote: >>> There is no need to use get_timer() and reset_timer() and there are build >> I must have missed something WRT reset_timer() -- my apologies >> if I'm covering old ground. >> >> When the timestamp is incremented using an interrupt that occurs with >> a period greater than 1 ms, we can get early timeouts. reset_timer() >> solved the problem. What's the recommended approach for dealing with >> this without reset_timer() ? >> > > There is an active thread on the timer API right now. Short answer - The > API is broken - Calling reset_timer() is not the right solution because: > a) It breaks recursive or nested timing loops > b) For some arches, udelay() has a side-effect as well > > All this needs fixing Understood. However, removing reset_timer() from cfi_flash.c, will result in early timeouts for certain boards/archs. Your patch removes commit 22d6c8faac4e9fa43232b0cf4da427ec14d72ad3 (Thu Apr 1 2010). I'd rather not break something that has been working for over a year before I know how to make it work again. Fair enough? Regards, --Scott