浏览代码

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 <christophe.leroy@c-s.fr>
Christophe Leroy 7 年之前
父节点
当前提交
f0eda3cb89
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/powerpc/lib/time.c

+ 1 - 1
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);