]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mtd: rawnand: sunxi: fix page size in control register
authorRichard Genoud <richard.genoud@bootlin.com>
Fri, 23 Jan 2026 11:45:00 +0000 (12:45 +0100)
committerMichael Trimarchi <michael@amarulasolutions.com>
Tue, 3 Feb 2026 20:45:25 +0000 (21:45 +0100)
The MACRO NFC_PAGE_SHIFT(x) already deals with removing 10 from
nand->page_shift, so it shouldn't be done twice.

Fixes: 4ccae81cdadc ("mtd: nand: Add the sunxi NAND controller driver")
Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/raw/sunxi_nand.c

index e463564474770d34767bf2af2ffb6328e30cbe47..ef27a4b7a36a3405f6822910db8a72a39a11a858 100644 (file)
@@ -328,7 +328,7 @@ static void sunxi_nfc_select_chip(struct mtd_info *mtd, int chip)
                sel = &sunxi_nand->sels[chip];
 
                ctl |= NFC_CE_SEL(sel->cs) | NFC_EN |
-                      NFC_PAGE_SHIFT(nand->page_shift - 10);
+                      NFC_PAGE_SHIFT(nand->page_shift);
                if (sel->rb.type == RB_NONE) {
                        nand->dev_ready = NULL;
                } else {