mtd/drivers/mtd/nand nand.c,1.39,1.40

gleixner at infradead.org gleixner at infradead.org
Tue Feb 18 08:26:05 EST 2003


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

Modified Files:
	nand.c 
Log Message:
not everything, what compiles works :)

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- nand.c	18 Feb 2003 12:12:15 -0000	1.39
+++ nand.c	18 Feb 2003 13:26:02 -0000	1.40
@@ -383,6 +383,8 @@
 	/* No ecc and software ecc 3/256, write all */
 	case NAND_ECC_NONE:
 		printk (KERN_WARNING "Writing data without ECC to NAND-FLASH is not recommended\n");
+		for (i = 0; i < mtd->oobblock; i++) 
+			writeb ( this->data_poi[i] , this->IO_ADDR_W);
 		break;
 	case NAND_ECC_SOFT:
 		this->calculate_ecc (&this->data_poi[0], &(ecc_code[0]));
@@ -541,9 +543,9 @@
 	u_char *data_poi, *oob_data = oob_buf;
 	u_char ecc_calc[6];
 	u_char ecc_code[6];
-	int	eccmode = *oobsel ? this->eccmode : NAND_ECC_NONE;
+	int	eccmode;
+	int *oob_config;
 
-	int *oob_config = oobconfigs[*oobsel];
 	
 	DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
 
@@ -557,6 +559,9 @@
 	// if oobsel is NULL, use chip defaults
 	if (oobsel == NULL) 
 		oobsel = &mtd->oobsel;		
+
+	eccmode = *oobsel ? this->eccmode : NAND_ECC_NONE;
+	oob_config = oobconfigs[*oobsel];
 
 	/* Grab the lock and see if the device is available */
 	nand_get_chip (this, mtd ,FL_READING, &erase_state);





More information about the linux-mtd-cvs mailing list