forked from Imagelibrary/rtems
bsps/xnandpsu: Write BBT to correct location
When writing out the Bad Block Table, write it to the targeted device and ensure the block is appropriately mapped to the targeted device.
This commit is contained in:
committed by
Joel Sherrill
parent
757fbd6bc7
commit
f823dba027
@@ -719,7 +719,12 @@ static s32 XNandPsu_WriteBbt(XNandPsu *InstancePtr, XNandPsu_BbtDesc *Desc,
|
||||
}
|
||||
#endif
|
||||
/* Write the Bad Block Table(BBT) to flash */
|
||||
#ifdef __rtems__
|
||||
Status = XNandPsu_EraseBlock(InstancePtr, Target,
|
||||
Block % InstancePtr->Geometry.NumTargetBlocks);
|
||||
#else
|
||||
Status = XNandPsu_EraseBlock(InstancePtr, 0U, Block);
|
||||
#endif
|
||||
if (Status != XST_SUCCESS) {
|
||||
goto Out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user