mtd/drivers/mtd/chips cfi_cmdset_0002.c,1.59,1.60

cdavies at infradead.org cdavies at infradead.org
Tue Oct 15 11:09:28 EDT 2002


Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv27552

Modified Files:
	cfi_cmdset_0002.c 
Log Message:
Moved check for secsi area presence to cfi_amdstd_setup


Index: cfi_cmdset_0002.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0002.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- cfi_cmdset_0002.c	15 Oct 2002 13:45:03 -0000	1.59
+++ cfi_cmdset_0002.c	15 Oct 2002 15:09:26 -0000	1.60
@@ -247,9 +247,26 @@
 		printk(KERN_NOTICE "cfi_cmdset_0002: Disabling fast programming due to code brokenness.\n");
 		cfi->fast_prog = 0;
 	}
+
+
+        /* does this chip have a secsi area? */
+	if(cfi->mfr==1){
+		
+		switch(cfi->id){
+		case 0x50:
+		case 0x53:
+		case 0x55:
+		case 0x56:
+		case 0x5C:
+		case 0x5F:
+			/* Yes */
+			mtd->read_user_prot_reg = cfi_amdstd_secsi_read;
+			mtd->read_fact_prot_reg = cfi_amdstd_secsi_read;
+		default:		       
+		}
+	}
+	
 		
-	mtd->read_user_prot_reg = cfi_amdstd_secsi_read;
-	mtd->read_fact_prot_reg = cfi_amdstd_secsi_read;
 	mtd->sync = cfi_amdstd_sync;
 	mtd->suspend = cfi_amdstd_suspend;
 	mtd->resume = cfi_amdstd_resume;
@@ -398,24 +415,6 @@
 	unsigned long ofs;
 	int chipnum;
 	int ret = 0;
-
-        /* does this chip even have a secsi area? */
-	if(cfi->mfr!=1)
-		return -EINVAL;
-	switch(cfi->id){
-	case 0x50:
-	case 0x53:
-	case 0x55:
-	case 0x56:
-	case 0x5C:
-	case 0x5F:
-		break;
-	default:
-		return -EINVAL;
-	}
-	
-        /* yes, it does... */
-
 
 
 	/* ofs: offset within the first chip that the first read should start */





More information about the linux-mtd-cvs mailing list