From mboxrd@z Thu Jan 1 00:00:00 1970 From: Axel Lin Date: Wed, 03 Jul 2013 23:17:32 +0800 Subject: [U-Boot] nds32: ag101/ag102: Inconsistent timer3 counter unit? Message-ID: <1372864652.4800.3.camel@phoenix> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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