[U-Boot] nds32: ag101/ag102: Inconsistent timer3 counter unit?
Axel Lin
axel.lin at ingics.com
Wed Jul 3 17:17:32 CEST 2013
Hi Macpaul,
For the case CONFIG_FTTMR010_EXT_CLK is not defined:
In reset_timer_masked():
lastdec = readl(&tmr->timer3_counter) / (CONFIG_SYS_CLK_FREQ / 2);
In get_timer_masked():
ulong now = readl(&tmr->timer3_counter) / (CONFIG_SYS_CLK_FREQ / 2 / 1024);
The code looks strange.
(Why one needs to be divided by 1024 and the other one does not?)
I'm not sure which one is correct.
Regards,
Axel
More information about the U-Boot
mailing list