]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: sunxi: do not count BBM bytes twice
authorRichard Genoud <richard.genoud@bootlin.com>
Tue, 17 Mar 2026 14:24:31 +0000 (15:24 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 25 Mar 2026 14:27:30 +0000 (15:27 +0100)
commit8fa72836be11ea70cbfa43f7f2253fa57ccc6ecd
tree15583ebb860404cc870d4ffe786eac7497054e03
parent848c13996c55fe4ea6bf5acc3ce6c8c5c944b5f6
mtd: rawnand: sunxi: do not count BBM bytes twice

BBM is already part of USER_DATA section, so we should not remove it twice

This was working ok because we are on the safe size, advertising that
there was 2 bytes less available than in reality.

But we can't change old platforms, since it may lead to a different ECC
strength, so, introduce a legacy flag for old platforms, and switch the
new platforms to the correct count.

Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/sunxi_nand.c