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:
Kinsey Moore
2023-12-02 14:16:14 -06:00
committed by Joel Sherrill
parent 757fbd6bc7
commit f823dba027

View File

@@ -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;
}