Skip to contentSkip to conversation

spl: nand: initialize writesize for am335x

PATCH In review [email protected] 2 participants 2 messages Sep 25, 2025 – Sep 26, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/mtd/nand/raw/am335x_spl_bch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/am335x_spl_bch.c +2 -0
index 4b50f351d35..a77206d3815 100644
@@ -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
#1 lore raw
Quoted 5 lines · On Thu, 25 Sep 2025 22:51:50 +0200, [email protected] wrote:

Initialize mtd->writesize in nand_init() as otherwise nand_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