projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93e85d0
)
power, timer: reset TBL before TBU
author
Christophe Leroy
<christophe.leroy@c-s.fr>
Thu, 13 Jul 2017 13:09:50 +0000
(15:09 +0200)
committer
Tom Rini
<trini@konsulko.com>
Sun, 23 Jul 2017 02:22:48 +0000
(22:22 -0400)
In order to avoid TBU increment due to TBL reaching its max
and wrapping, reset TBL before resetting TBU
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
arch/powerpc/lib/time.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/lib/time.c
b/arch/powerpc/lib/time.c
index ff9bb67e28686a9ec4b54bb9aa474e7184e75757..c43f254481a3c8a9ee4fdb1ca6dd12c527bf4396 100644
(file)
--- a/
arch/powerpc/lib/time.c
+++ b/
arch/powerpc/lib/time.c
@@
-66,7
+66,7
@@
int timer_init(void)
unsigned long temp;
/* reset */
- asm volatile("li %0,0 ; mttb
u %0 ; mttbl
%0;"
+ asm volatile("li %0,0 ; mttb
l %0 ; mttbu
%0;"
: "=&r"(temp) );
return (0);