
Hi Stephen,
On 25 February 2015 at 16:10, Stephen Warren swarren@wwwdotorg.org wrote:
On 02/17/2015 03:29 PM, Simon Glass wrote:
Add an implementation of the timer functions for tegra, so that timing is more accurate. Tegra has a 1 microsecond timer for this purpose.
I'm a bit confused about this:
include/configs/tegra-common.h:32:#define CONFIG_SYS_TIMER_COUNTER NV_PA_TMRUS_BASE
lib/time.c:
#ifdef CONFIG_SYS_TIMER_COUNTER unsigned long notrace timer_read_counter(void) { #ifdef CONFIG_SYS_TIMER_COUNTS_DOWN return ~readl(CONFIG_SYS_TIMER_COUNTER); #else return readl(CONFIG_SYS_TIMER_COUNTER); #endif }
Doesn't that provide the same set of features, without requiring Tegra-specific code?
Yes you are right. I couldn't find out where this was being done and was seeing strange behaviour with udelay(). I'm not very keen on the lldiv() in lib/time.c when it is a no-op. But I suppose all it can do is slow things down a bit.
Anyway, we can drop this patch.
Regards, Simon