Message ID | ce88a7347bdc84fa4658e0ddbd3214d887d6a658.1499629706.git.christophe.leroy@c-s.fr |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
Dear Christophe Leroy, In message <ce88a7347bdc84fa4658e0ddbd3214d887d6a658.1499629706.git.christophe.leroy@c-s.fr> you wrote: > 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Wolfgang Denk <wd@denx.de> Best regards, Wolfgang Denk
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index ff9bb67e28..c43f254481 100644 --- 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 ; mttbu %0 ; mttbl %0;" + asm volatile("li %0,0 ; mttbl %0 ; mttbu %0;" : "=&r"(temp) ); return (0);
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)