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.
This commit is contained in:
Kinsey Moore
2023-12-02 14:11:36 -06:00
committed by Joel Sherrill
parent d6b75cc248
commit 757fbd6bc7

View File

@@ -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++) {