diff options
author | Harald Seiler <hws@denx.de> | 2018-12-07 12:19:36 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-01-01 16:12:18 +0300 |
commit | d98f191aff4b387fcd083d503a6c88bd468deb69 (patch) | |
tree | 657dd7f52ca38f1051d7e40a6e39ef8a92bad585 /include/configs/pcm058.h | |
parent | 416f63194b7188f22156507d9e3652f19b1bb844 (diff) | |
download | u-boot-d98f191aff4b387fcd083d503a6c88bd468deb69.tar.xz |
pcm058: fix NAND flash not using badblock table
Currently, U-Boot ignores the BBT stored in the last 4 blocks of NAND
flash because the NAND_BBT_USE_FLASH flag is not set. This leads to
two issues:
* U-Boot silently uses a memory-only BBT which is initialized with all
blocks marked as good. This means, actual bad blocks are marked good
and U-Boot might try writing to or reading from them.
* The BBT in flash, which will be created once Linux boots up, is not
off limits for a driver ontop, like UBI. While it does not seem to
consistently produce an error, sometimes UBI will fail to attach
because the BBT blocks obviously don't contain valid UBI data.
To fix this, this patch sets the CONFIG_SYS_NAND_USE_FLASH_BBT option,
which is used in ./drivers/mtd/nand/raw/mxs_nand.c to decide whether
a BBT in flash is used.
Signed-off-by: Harald Seiler <hws@denx.de>
Diffstat (limited to 'include/configs/pcm058.h')
-rw-r--r-- | include/configs/pcm058.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h index 49048c163f..b9bc08b388 100644 --- a/include/configs/pcm058.h +++ b/include/configs/pcm058.h @@ -55,6 +55,7 @@ #define CONFIG_SYS_NAND_BASE 0x40000000 #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_ONFI_DETECTION +#define CONFIG_SYS_NAND_USE_FLASH_BBT #endif /* DMA stuff, needed for GPMI/MXS NAND support */ |