]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
spl: nand: initialize writesize for am335x
authorYegor Yefremov <yegorslists@googlemail.com>
Thu, 25 Sep 2025 20:51:50 +0000 (22:51 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 26 Sep 2025 00:54:07 +0000 (18:54 -0600)
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>
drivers/mtd/nand/raw/am335x_spl_bch.c

index 4b50f351d35d0b885d1d678ce3c4f479bba74c4f..a77206d3815f85afd182db0cbd1333fbf78afb26 100644 (file)
@@ -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);
 }