aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/onenand/onenand_base.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index e342ba04118a..6b950ab8ea8d 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -965,8 +965,11 @@ static int onenand_write_oob(struct mtd_info *mtd, loff_t to, size_t len,
965 965
966 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize); 966 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize);
967 967
968 this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize); 968 /* We send data to spare ram with oobsize
969 this->write_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen); 969 * to prevent byte access */
970 memset(this->page_buf, 0xff, mtd->oobsize);
971 memcpy(this->page_buf + column, buf, thislen);
972 this->write_bufferram(mtd, ONENAND_SPARERAM, this->page_buf, 0, mtd->oobsize);
970 973
971 this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize); 974 this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize);
972 975