From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 18 Jun 2015 14:34:49 +0200 Subject: [U-Boot] Very slow fatload on bcm2835 In-Reply-To: <558179C9.6000703@myspectrum.nl> References: <20150611203514.2f83d4b3@north> <201506171243.05720.marex@denx.de> <558179C9.6000703@myspectrum.nl> Message-ID: <201506181434.49781.marex@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 Wednesday, June 17, 2015 at 03:44:41 PM, Jeroen Hofstee wrote: > Hello Marek, > > - while (get_timer(bcm_host->last_write) < bcm_host->twoticks_delay) > + while (timer_get_us() < bcm_host->last_write + > bcm_host->twoticks_delay) > ; > > Can this counter / the right side of the comparison not overflow? Yes it can -- what do you suggest to make it overflow-safe in this particular case ? Best regards, Marek Vasut