From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 22 Mar 2013 09:28:52 -0600 Subject: [U-Boot] [PATCH] mmc: bcm2835: fix delays in bug workaround In-Reply-To: <20130322074132.11ab8cb2@lilith> References: <1363924938-18322-1-git-send-email-swarren@wwwdotorg.org> <20130322074132.11ab8cb2@lilith> Message-ID: <514C78B4.2010607@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/22/2013 12:41 AM, Albert ARIBAUD wrote: > Hi Stephen, > > On Thu, 21 Mar 2013 22:02:18 -0600, Stephen Warren > wrote: > >> The back-to-back-writes workaround in the BCM2835 MMC driver assumed >> that get_timer() returned uS. Now that it returns mS, the delay is far >> too long. Use udelay() directly to avoid this. Dispense with the >> "last_write" code since we now have no way of recording an absolute >> time in uS. The difference between two un-averaged tests loading a >> zImage is 445 mS vs the original 412 mS, so the difference doesn't >> appear too relevant. > > I don't entirely get the 'we have no way of recording an absolute time > in us': doesn't get_timer_us() precisely provide this absolute us time > just like 'old' get_timer(base) did? IOW, could you not simply turn > every get_timer(X) into (get_timer_us()-X)? Well, I could do that, but that's an internal private API inside timer.c, not something exported. Should I explicitly export it and allow the driver to use that?