summaryrefslogtreecommitdiff
path: root/drivers/mtd/onenand/onenand_bbt.c
diff options
context:
space:
mode:
authorKyungmin Park <kmpark@infradead.org>2008-08-13 09:11:02 +0900
committerScott Wood <scottwood@freescale.com>2008-08-13 11:00:19 -0500
commitd438d50848e9425286e5fb0493e0affb5a0b1e1b (patch)
tree49406f77ad245aca8e1e21b98f2d3216c2a3f774 /drivers/mtd/onenand/onenand_bbt.c
parent8641ff266ae6638da201747c239fd39ba34c4958 (diff)
downloadu-boot-imx-d438d50848e9425286e5fb0493e0affb5a0b1e1b.zip
u-boot-imx-d438d50848e9425286e5fb0493e0affb5a0b1e1b.tar.gz
u-boot-imx-d438d50848e9425286e5fb0493e0affb5a0b1e1b.tar.bz2
Fix OneNAND build break
Since page size field is changed from oobblock to writesize. But OneNAND is not updated. - fix bufferram management at erase operation This patch includes the NAND/OneNAND state filed too. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd/onenand/onenand_bbt.c')
-rw-r--r--drivers/mtd/onenand/onenand_bbt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 87344ab..318d877 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -97,7 +97,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
/* No need to read pages fully,
* just read required OOB bytes */
ret = onenand_read_oob(mtd,
- from + j * mtd->oobblock +
+ from + j * mtd->writesize +
bd->offs, readlen, &retlen,
&buf[0]);
@@ -107,7 +107,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
}
if (check_short_pattern
- (&buf[j * scanlen], scanlen, mtd->oobblock, bd)) {
+ (&buf[j * scanlen], scanlen, mtd->writesize, bd)) {
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
printk(KERN_WARNING
"Bad eraseblock %d at 0x%08x\n", i >> 1,