Skip to content

Commit 9b45d57

Browse files
yegorichtrini
authored andcommitted
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 <[email protected]>
1 parent 9a20a4f commit 9b45d57

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/mtd/nand/raw/am335x_spl_bch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ void nand_init(void)
212212
if (nand_chip.select_chip)
213213
nand_chip.select_chip(mtd, 0);
214214

215+
mtd->writesize = CONFIG_SYS_NAND_PAGE_SIZE;
216+
215217
/* NAND chip may require reset after power-on */
216218
nand_command(0, 0, 0, NAND_CMD_RESET);
217219
}

0 commit comments

Comments
 (0)