public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] nds32: ag101/ag102: Inconsistent timer3 counter unit?
@ 2013-07-03 15:17 Axel Lin
  2013-07-08  3:02 ` Kuan-Yu Kuo
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-07-03 15:17 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-08  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 15:17 [U-Boot] nds32: ag101/ag102: Inconsistent timer3 counter unit? Axel Lin
2013-07-08  3:02 ` Kuan-Yu Kuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox