From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Leroy Date: Wed, 12 Jul 2017 11:43:24 +0200 (CEST) Subject: [U-Boot] [PATCH 04/14] power, timer: reset TBL before TBU In-Reply-To: References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In order to avoid TBU increment due to TBL reaching its max and wrapping, reset TBL before resetting TBU Signed-off-by: Christophe Leroy --- arch/powerpc/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.12.0