]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mtd: rawnand: sunxi_spl: increase max_oobsize for 2KiB pages
authorRichard Genoud <richard.genoud@bootlin.com>
Fri, 23 Jan 2026 11:44:53 +0000 (12:44 +0100)
committerMichael Trimarchi <michael@amarulasolutions.com>
Tue, 3 Feb 2026 20:45:06 +0000 (21:45 +0100)
Increase max_oobsize to take into account bigger OOB on 2KiB pages

Some NAND chip (e.g. Kioxia TC58NVG1S3HTA00) have a 2KiB page size +
128 bytes OOB.
In order to detect them, the max_oobsize has to be increased from 64 to
128 bytes.

Tested on Kioxia TC58NVG1S3HTA00 NAND chip on Whatsminer H616 board.

Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/raw/sunxi_nand_spl.c

index da94285e6b72f38f2e9ff8bc3e5cd326f9c58815..9a6286b015d4ac67f8b3a63043d21a50e2a96e06 100644 (file)
@@ -303,7 +303,7 @@ static int nand_max_ecc_strength(struct nfc_config *conf)
         */
        switch (conf->page_size) {
        case 2048:
-               max_oobsize = 64;
+               max_oobsize = 128;
                break;
        case 4096:
                max_oobsize = 256;