summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-05 12:13:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-05 14:34:01 +0100
commitf75d80d63e50efb0ab35b11ecdad2b917a5758a8 (patch)
treeb94d693b4a1a32768969d2842c9b6e479b9ca88e /drivers/mtd/nand/Makefile
parent6d7945380f1553ef90923c6b204c440fd331dab9 (diff)
downloadbarebox-f75d80d63e50efb0ab35b11ecdad2b917a5758a8.tar.gz
barebox-f75d80d63e50efb0ab35b11ecdad2b917a5758a8.tar.xz
mtd: nand-imx: do not use blocks reserved for BBT
Due to the differences of the logical page format and the raw page format on NAND the generic nand support can't read the bad block marker on the NAND. For this reason we cleared the NAND_BBT_CREATE flag and have the imx_nand_bbm command to create a BBT if none is found in the flash. We have also cleared the NAND_BBT_WRITE flag which causes problems. Normally a BBT occupies two blocks in NAND, but to have some space for the BBT when one of these becomes bad we normally reserve 4 blocks for the BBT. In case we want to write the BBT to flash we have to reserve them from being written to by general NAND operations. In case we don't ever write to the BBT, as indicated by a cleared NAND_BBT_WRITE flag, the reserved blocks can be used by the general NAND operations. This way it happens that barebox uses the reserved blocks for data storage, but Linux (which has NAND_BBT_WRITE set) can't read any data from it. This results in corrupted UBI images. It's not necessary to clear the NAND_BBT_WRITE flag, all we really have to do is to prevent the BBT layer from creating a new BBT. For this it's enough to clear the NAND_BBT_CREATE flag. Fixes: 545453ddae ("mtd: nand: Add command to generate a flash BBT") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/Makefile')
0 files changed, 0 insertions, 0 deletions