提交 ff250f3e 编写于 作者: M Marek Vasut 提交者: Albert ARIBAUD

MX28: Fix get_timer() / get_tbclk() issue

Signed-off-by: NMarek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
上级 61698fd5
......@@ -82,7 +82,7 @@ int timer_init(void)
return 0;
}
ulong get_timer(ulong base)
unsigned long long get_ticks(void)
{
struct mx28_timrot_regs *timrot_regs =
(struct mx28_timrot_regs *)MXS_TIMROT_BASE;
......@@ -103,7 +103,17 @@ ulong get_timer(ulong base)
}
lastdec = now;
return tick_to_time(timestamp) - base;
return timestamp;
}
ulong get_timer_masked(void)
{
return tick_to_time(get_ticks());
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;
}
/* We use the HW_DIGCTL_MICROSECONDS register for sub-millisecond timer. */
......@@ -139,3 +149,8 @@ void __udelay(unsigned long usec)
old = new;
}
}
ulong get_tbclk(void)
{
return MX28_INCREMENTER_HZ;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册