mtd/drivers/mtd/onenand onenand_base.c,1.16,1.17

kyungmin.park at samsung.com kyungmin.park at samsung.com
Thu Jan 26 19:09:34 EST 2006


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

Modified Files:
	onenand_base.c 
Log Message:
[MTD] OneNAND: Write oob area with aligned size, mtd->oobsize

There's some problem with write oob in serveral platform.
So we write oob with oobsize aligned (16bytes) instead of 3 bytes (from {2,
3})


Index: onenand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/onenand/onenand_base.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- onenand_base.c	27 Jan 2006 00:01:19 -0000	1.16
+++ onenand_base.c	27 Jan 2006 00:09:31 -0000	1.17
@@ -967,8 +967,11 @@
 
 		this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize);
 
-		this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize);
-		this->write_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen);
+		/* We send data to spare ram with oobsize
+		 * to prevent byte access */
+		memset(this->page_buf, 0xff, mtd->oobsize);
+		memcpy(this->page_buf + column, buf, thislen);
+		this->write_bufferram(mtd, ONENAND_SPARERAM, this->page_buf, 0, mtd->oobsize);
 
 		this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize);
 





More information about the linux-mtd-cvs mailing list