Skip to content

Commit

Permalink
OneNAND: Write oob area with aligned size, mtd->oobsize
Browse files Browse the repository at this point in the history
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})

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
  • Loading branch information
Kyungmin Park authored and Jarkko Lavinen committed May 12, 2006
1 parent 8e6ec69 commit 34c1060
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,11 @@ static int onenand_write_oob(struct mtd_info *mtd, loff_t to, size_t len,

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);

Expand Down

0 comments on commit 34c1060

Please sign in to comment.