diff options
author | Kinsey Moore <kinsey.moore@oarcorp.com> | 2023-12-02 14:11:36 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2023-12-14 13:40:03 -0600 |
commit | 757fbd6bc7b9fa182574319340d75e09b2456ea3 (patch) | |
tree | 0b04d7ce65090298f1fa149a43c988038b3aa16f /bsps/shared/dev/nand/xnandpsu_bbm.c | |
parent | bsps/xnandpsu: Read correct BBT size (diff) | |
download | rtems-757fbd6bc7b9fa182574319340d75e09b2456ea3.tar.bz2 |
bsps/xnandpsu: Detect missing BBTs
Mark the BBT descriptor as invalid before scanning to ensure that
missing BBTs are detected and written correctly if necessary.
Diffstat (limited to '')
-rw-r--r-- | bsps/shared/dev/nand/xnandpsu_bbm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bsps/shared/dev/nand/xnandpsu_bbm.c b/bsps/shared/dev/nand/xnandpsu_bbm.c index df16d6f114..0f74ab3ee8 100644 --- a/bsps/shared/dev/nand/xnandpsu_bbm.c +++ b/bsps/shared/dev/nand/xnandpsu_bbm.c @@ -563,6 +563,9 @@ static s32 XNandPsu_SearchBbt(XNandPsu *InstancePtr, XNandPsu_BbtDesc *Desc, VerOffset = Desc->VerOffset; MaxBlocks = Desc->MaxBlocks; SigLength = Desc->SigLength; +#ifdef __rtems__ + Desc->Valid = 0; +#endif /* Read the last 4 blocks for Bad Block Table(BBT) signature */ for(Block = 0U; Block < MaxBlocks; Block++) { |