summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-02-10 16:01:46 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-03-11 14:22:46 +0000
commit13ce77f46c79a3839e4c2ff9722c9416c165f498 (patch)
treedb584a38edc5478ffdd6326afbffddf7f9158dd5 /drivers/mtd/chips/cfi_cmdset_0001.c
parentd8f90b2c9d521500bcd4a1ecdcdb283bfdd2186f (diff)
downloadop-kernel-dev-13ce77f46c79a3839e4c2ff9722c9416c165f498.zip
op-kernel-dev-13ce77f46c79a3839e4c2ff9722c9416c165f498.tar.gz
mtd: cfi: fix writebufsize initialization
When initializing mtd->writebufsize, we must take into account possible flash chip interleaving. Wrong writebufsize initialization caused UBIFS recovery issues resulting in unmountable UBIFS file system on NOR flash partitions. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Guillaume LECERF <glecerf@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 4aaa88f..092aef1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -455,7 +455,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
mtd->flags = MTD_CAP_NORFLASH;
mtd->name = map->name;
mtd->writesize = 1;
- mtd->writebufsize = 1 << cfi->cfiq->MaxBufWriteSize;
+ mtd->writebufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
mtd->reboot_notifier.notifier_call = cfi_intelext_reboot;
OpenPOWER on IntegriCloud