From: Christophe Leroy Date: Thu, 13 Jul 2017 13:09:50 +0000 (+0200) Subject: power, timer: reset TBL before TBU X-Git-Tag: v2017.09-rc1~152 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0eda3cb89813c49d90fec7ee5fa69d3fe3d6daa;p=u-boot power, timer: reset TBL before TBU In order to avoid TBU increment due to TBL reaching its max and wrapping, reset TBL before resetting TBU Signed-off-by: Christophe Leroy --- 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);