
On 12:52 Mon 29 Jun , Alessandro Rubini wrote:
From: Alessandro Rubini rubini@unipv.it
This sets CONFIG_SYS_HZ to 1000 as required, and completely rewrites timer code, which is now both correct and much smaller. Unused functions like udelay_masked() have been removed as no driver uses them, even the ones that are not currently active for this board. mtu.h is copied literally from the kernel sources.
Signed-off-by: Alessandro Rubini rubini@unipv.it Acked-by: Andrea Gallo andrea.gallo@stericsson.com
I've used mtu.h from kernel sources and done the other changes as requested (the extra variable just to return it was a mishap from an earlier printf I needed to find a misconfig).
for the record what is its precision now?
it counts at 2.4MHz, so the 1000HZ tick has no approximation and udelay is correct with sub-microsecond error. I'll use in soft_i2c, needed to turn on the LCD light.
cpu/arm926ejs/nomadik/mtu.h | 45 +++++++++++
if it's ok with I'll move it to include/asm-arm/arch-nomadik/
Best Regards, J.