[U-Boot] [PATCH 2/2] mtd: nor: initialize writebufsize field

Andrew Ruder andrew.ruder at elecsyscorp.com
Tue Nov 4 17:07:58 CET 2014


UBI drivers error out if writebufsize is not filled in correctly.  Grab
this information from the CFI flash_info struct.

Signed-off-by: Andrew Ruder <andrew.ruder at elecsyscorp.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Heiko Schocher <hs at denx.de>
Cc: Stefan Roese <sr at denx.de>
---
 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..d4c9609 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	= fi->buffer_size;
 
 		mtd->_erase		= cfi_mtd_erase;
 		mtd->_read		= cfi_mtd_read;
-- 
2.1.1



More information about the U-Boot mailing list