* [PATCH] OneNAND: write oob with oobsize to prevent byte access
@ 2006-01-26 1:37 Kyungmin Park
0 siblings, 0 replies; only message in thread
From: Kyungmin Park @ 2006-01-26 1:37 UTC (permalink / raw)
To: linux-mtd
Hi
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})
If you don't mind I will commit this with write oob verify patch from Jarkko
Lavinen
Regards,
Kyungmin Park
Index: drivers/mtd/onenand/onenand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/onenand/onenand_base.c,v
retrieving revision 1.15
diff -u -p -r1.15 onenand_base.c
--- drivers/mtd/onenand/onenand_base.c 20 Jan 2006 15:29:28 -0000 1.15
+++ drivers/mtd/onenand/onenand_base.c 26 Jan 2006 01:29:00 -0000
@@ -936,8 +936,11 @@ static int onenand_write_oob(struct mtd_
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-26 1:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-26 1:37 [PATCH] OneNAND: write oob with oobsize to prevent byte access Kyungmin Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox