forked from Imagelibrary/rtems
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:
committed by
Joel Sherrill
parent
d6b75cc248
commit
757fbd6bc7
@@ -563,6 +563,9 @@ static s32 XNandPsu_SearchBbt(XNandPsu *InstancePtr, XNandPsu_BbtDesc *Desc,
|
|||||||
VerOffset = Desc->VerOffset;
|
VerOffset = Desc->VerOffset;
|
||||||
MaxBlocks = Desc->MaxBlocks;
|
MaxBlocks = Desc->MaxBlocks;
|
||||||
SigLength = Desc->SigLength;
|
SigLength = Desc->SigLength;
|
||||||
|
#ifdef __rtems__
|
||||||
|
Desc->Valid = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Read the last 4 blocks for Bad Block Table(BBT) signature */
|
/* Read the last 4 blocks for Bad Block Table(BBT) signature */
|
||||||
for(Block = 0U; Block < MaxBlocks; Block++) {
|
for(Block = 0U; Block < MaxBlocks; Block++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user