diff options
author | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-22 17:18:05 -0400 |
---|---|---|
committer | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-22 17:18:05 -0400 |
commit | 28318776a80bc3261f9af91ef79e6e38bb9f5bec (patch) | |
tree | 36ef9144accf19db9d51019aa479807e80aeb8fd /drivers/mtd/onenand/onenand_bbt.c | |
parent | 8ca9ed5db3aea8d27989c239e8a2f79b839f1e99 (diff) |
[MTD] Introduce writesize
At least two flashes exists that have the concept of a minimum write unit,
similar to NAND pages, but no other NAND characteristics. Therefore, rename
the minimum write unit to "writesize" for all flashes, including NAND.
Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'drivers/mtd/onenand/onenand_bbt.c')
-rw-r--r-- | drivers/mtd/onenand/onenand_bbt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 4510d3361eaa..aafd7c2f7802 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c | |||
@@ -87,13 +87,13 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr | |||
87 | 87 | ||
88 | /* No need to read pages fully, | 88 | /* No need to read pages fully, |
89 | * just read required OOB bytes */ | 89 | * just read required OOB bytes */ |
90 | ret = mtd->read_oob(mtd, from + j * mtd->oobblock + bd->offs, | 90 | ret = mtd->read_oob(mtd, from + j * mtd->writesize + bd->offs, |
91 | readlen, &retlen, &buf[0]); | 91 | readlen, &retlen, &buf[0]); |
92 | 92 | ||
93 | if (ret) | 93 | if (ret) |
94 | return ret; | 94 | return ret; |
95 | 95 | ||
96 | if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->oobblock, bd)) { | 96 | if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) { |
97 | bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); | 97 | bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); |
98 | printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", | 98 | printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", |
99 | i >> 1, (unsigned int) from); | 99 | i >> 1, (unsigned int) from); |