Hi Graeme, On Wed, Apr 17, 2013 at 7:53 PM, Graeme Russ <graeme.r...@gmail.com> wrote: > Hi Simon, > > > On Thu, Apr 18, 2013 at 12:13 PM, Simon Glass <s...@chromium.org> wrote: >> >> While we don't want PCAT timers for timing, we want timer 2 so that we can >> still make a beep. Re-purpose the PCAT driver for this, and enable it in >> coreboot. >> >> Signed-off-by: Simon Glass <s...@chromium.org> >> --- >> arch/x86/include/asm/u-boot-x86.h | 1 + >> arch/x86/lib/Makefile | 2 +- >> arch/x86/lib/pcat_timer.c | 69 >> ++------------------------------------- >> arch/x86/lib/tsc_timer.c | 6 +++- >> include/configs/coreboot.h | 1 + >> 5 files changed, 11 insertions(+), 68 deletions(-) > > [snip] > >> -/* this is not very exact */ >> -void __udelay(unsigned long usec) >> -{ >> - int counter; >> - int wraps; >> - >> - if (timer_init_done) { >> - counter = read_pit(); >> - wraps = usec / 1000; >> - usec = usec % 1000; >> - >> - usec *= 1194; >> - usec /= 1000; >> - usec += counter; >> - >> - while (usec > 1194) { >> - usec -= 1194; >> - wraps++; >> - } >> - >> - while (1) { >> - int new_count = read_pit(); >> - >> - if (((new_count < usec) && !wraps) || wraps < 0) >> - break; >> - >> - if (new_count > counter) >> - wraps--; >> - >> - counter = new_count; >> - } >> - } >> - >> -} > > This does not seem related...
It really should be in a clean-up patch. But now that I am squashing them, I will just add it to the squashed patch. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot