spl: nand: initialize writesize for am335x
Subsystems (2)
PATCH 1/1 spl: nand: initialize writesize for am335x
From: Yegor Yefremov <[email protected]>
Initialize mtd->writesize in nand_init() as otherwise nand_page_size() returns 0 and this affects NAND read operations.
Signed-off-by Yegor Yefremov <[email protected]>
--- drivers/mtd/nand/raw/am335x_spl_bch.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/am335x_spl_bch.c +2 -0
@@ -212,6 +212,8 @@ void nand_init(void)if (nand_chip.select_chip) nand_chip.select_chip (mtd,0 ); + mtd->writesize =CONFIG_SYS_NAND_PAGE_SIZE ; +/* NAND chip may require reset after power-on */ nand_command (0 ,0 ,0 ,NAND_CMD_RESET ); }
Signature · 1 line
2.34.1
Quoted 5 lines · On Thu, 25 Sep 2025 22:51:50 +0200, [email protected] wrote:
Initialize
mtd->writesizeinnand_init()as otherwisenand_page_size()returns 0 and this affects NAND read operations.
Applied to u-boot/master, thanks!
[1/1] spl: nand: initialize writesize for am335x
commit: 9b45d574af1b64fcd997f08fe702a2d0ecfccbe4
Signature · 1 line
Tom