mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-08-21 04:36:18 -04:00
sh: timer: Remove unnecessary variable 'ticks'
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
117029c510
commit
78df8c68cd
@ -108,14 +108,9 @@ int timer_init (void)
|
|||||||
unsigned long long get_ticks (void)
|
unsigned long long get_ticks (void)
|
||||||
{
|
{
|
||||||
unsigned long tcnt = 0 - readl(TCNT0);
|
unsigned long tcnt = 0 - readl(TCNT0);
|
||||||
unsigned long ticks;
|
|
||||||
|
|
||||||
if (last_tcnt > tcnt) { /* overflow */
|
if (last_tcnt > tcnt) /* overflow */
|
||||||
overflow_ticks++;
|
overflow_ticks++;
|
||||||
ticks = (0xffffffff - last_tcnt) + tcnt;
|
|
||||||
} else {
|
|
||||||
ticks = tcnt;
|
|
||||||
}
|
|
||||||
last_tcnt = tcnt;
|
last_tcnt = tcnt;
|
||||||
|
|
||||||
return (overflow_ticks << 32) | tcnt;
|
return (overflow_ticks << 32) | tcnt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user