changeset 160:ee69ddb11f93

When it takes too much time to lock the RAM, addresses the problem of failed to initialize.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Mon, 10 Sep 2012 20:56:14 +0900
parents 38f79bcba50d
children ade99239f234
files driver/pt1_i2c.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/driver/pt1_i2c.c	Mon Sep 10 20:43:22 2012 +0900
+++ b/driver/pt1_i2c.c	Mon Sep 10 20:56:14 2012 +0900
@@ -165,14 +165,14 @@
 
 	__u32	val ;
 	__u32	val2 ;
-	int		lp ;
+	int		lp,lp2 ;
 
 	val = (readl(regs) & lockval);
 	writel(firstval, regs);
 
 	// RAMがロックされた?
 	for(lp = 0 ; lp < 10 ; lp++){
-		for(lp = 0 ; lp < 1024 ; lp++){
+		for(lp2 = 0 ; lp2 < 1024 ; lp2++){
 			val2 = readl(regs);
 			// 最初に取得したデータと逆になればOK
 			if(((val2 & lockval) != val)){