mtd: cfi_cmdset_0002: 65 nm changes
PATCH 2/2 mtd: cfi_cmdset_0002: 65 nm changes
To increase both program throughput and data reliability, Spansion recommends to operate today's flash devices that are built in 65 nm or smaller process technology in block write mode. For example, the Spansion S29GL-S family internally programs data in chunks of 32 bytes. Therefore a writesize of a multiple of 32 bytes would be fine in general. A value of 512 has been found a good compromise between maximum throughput (the larger the better) and risk of data loss during a power failure event (the smaller the better).
Signed-off-by Gernot Hoyler <[email protected]>
--- drivers/mtd/chips/cfi_cmdset_0002.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/mtd/chips/cfi_cmdset_0002.c +8 -0
@@ -196,9 +196,17 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) {struct map_info *map = mtd->priv;struct cfi_private *cfi = map->fldrv_priv; +struct cfi_pri_amdstd *extp = cfi->cmdset_priv; +if (cfi->cfiq->BufWriteTimeoutTyp) {pr_debug ("Using buffer write method\n" ); mtd->_write = cfi_amdstd_write_buffers; + +if (extp->SiliconRevision >=0x1C ) { + mtd->writesize =512 ; + mtd->flags &= ~MTD_BIT_WRITEABLE ; +printk (KERN_INFO "Setting mtd writesize = 512 bytes\n" ); + } } }
Signature · 1 line
1.7.4.2