spl: nand: initialize writesize for am335x

Initialize mtd->writesize in nand_init() as otherwise
nand_page_size() returns 0 and this affects NAND read
operations.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
This commit is contained in:
Yegor Yefremov 2025-09-25 22:51:50 +02:00 committed by Tom Rini
parent 9a20a4fba5
commit 9b45d574af

View File

@ -212,6 +212,8 @@ void nand_init(void)
if (nand_chip.select_chip) if (nand_chip.select_chip)
nand_chip.select_chip(mtd, 0); nand_chip.select_chip(mtd, 0);
mtd->writesize = CONFIG_SYS_NAND_PAGE_SIZE;
/* NAND chip may require reset after power-on */ /* NAND chip may require reset after power-on */
nand_command(0, 0, 0, NAND_CMD_RESET); nand_command(0, 0, 0, NAND_CMD_RESET);
} }