From: Christophe Kerello Date: Tue, 12 Aug 2025 12:35:11 +0000 (+0200) Subject: mtd: rawnand: stm32_fmc2: set available OOB bytes per page X-Git-Tag: v2025.10-rc4~11^2~2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c28c4d9a3a814cebb93e20842ed2c1c90f703d3;p=pandora-u-boot.git mtd: rawnand: stm32_fmc2: set available OOB bytes per page File system such as YAFFS2 need to know the number of available OOB bytes per page to be able to choose if they should locate their metadata in the data area or in the spare area. Signed-off-by: Christophe Kerello Reviewed-by: Patrice Chotard --- diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index d1c88643c98..21e3c88a55a 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -1034,6 +1034,7 @@ static int stm32_fmc2_nfc_probe(struct udevice *dev) ecclayout->eccpos[i] = oob_index; ecclayout->oobfree->offset = oob_index; ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset; + ecclayout->oobavail = ecclayout->oobfree->length; chip->ecc.layout = ecclayout; if (chip->options & NAND_BUSWIDTH_16)