bsps/xnandpsu: Allow creation of BBT

This fixes a logic inversion that was preventing creation of a Bad Block
Table (BBT) from scratch on devices that lack one. This was discovered
during upstream integration testing. The BBT management layer in this
driver is not designed to be easily testable other than on real hardware.
This commit is contained in:
Kinsey Moore
2024-02-21 10:08:12 -06:00
committed by Joel Sherrill
parent be81a22332
commit 75d7af409f

View File

@@ -653,7 +653,7 @@ static s32 XNandPsu_WriteBbt(XNandPsu *InstancePtr, XNandPsu_BbtDesc *Desc,
for(Index = 0U; Index < Desc->MaxBlocks; Index++) {
Block = (EndBlock - Index);
#ifdef __rtems__
if (XNandPsu_IsBlockBad(InstancePtr, Block) == XST_FAILURE) {
if (XNandPsu_IsBlockBad(InstancePtr, Block) != XST_FAILURE) {
continue;
}
#else