[U-Boot] [PATCH v2] mtd, cfi, ubi: add missing writebufsize initialization

Heiko Schocher hs at denx.de
Fri Oct 31 11:29:45 CET 2014


ff94bc40af3481d47546595ba73c136de6af6929 "mtd, ubi, ubifs: resync with Linux-3.14"
introduced the writebufsize field in struct mtd_info, which
is not initialized in the cfi_flash driver, which leads in
not working ubi on cfi flashes. Fix it

Signed-off-by: Heiko Schocher <hs at denx.de>
Reported-by: Andrew Ruder <andrew.ruder at elecsyscorp.com>
Acked-by: Stefan Roese <sr at denx.de>

---
@Andrew: could you test this patch, if it solves your issue?

Changes in v2:
add comment from Stefan Roese
  - align the "=" with the others lines above
add Acked-by from Stefan Roese

 drivers/mtd/cfi_mtd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c
index ac805ff..709a486 100644
--- a/drivers/mtd/cfi_mtd.c
+++ b/drivers/mtd/cfi_mtd.c
@@ -226,6 +226,7 @@ int cfi_mtd_init(void)
 		mtd->flags		= MTD_CAP_NORFLASH;
 		mtd->size		= fi->size;
 		mtd->writesize		= 1;
+		mtd->writebufsize	= mtd->writesize;
 
 		mtd->_erase		= cfi_mtd_erase;
 		mtd->_read		= cfi_mtd_read;
-- 
1.8.3.1



More information about the U-Boot mailing list