[rtems commit] bsps/xnandpsu: Write BBT to correct location
Joel Sherrill
joel at rtems.org
Thu Dec 14 19:11:58 UTC 2023
Module: rtems
Branch: master
Commit: f823dba027ad20bd111108461a8386a34eb675d4
Changeset: http://git.rtems.org/rtems/commit/?id=f823dba027ad20bd111108461a8386a34eb675d4
Author: Kinsey Moore <kinsey.moore at oarcorp.com>
Date: Sat Dec 2 14:16:14 2023 -0600
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.
---
bsps/shared/dev/nand/xnandpsu_bbm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bsps/shared/dev/nand/xnandpsu_bbm.c b/bsps/shared/dev/nand/xnandpsu_bbm.c
index 0f74ab3ee8..d1b7d5a39d 100644
--- a/bsps/shared/dev/nand/xnandpsu_bbm.c
+++ b/bsps/shared/dev/nand/xnandpsu_bbm.c
@@ -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;
}
More information about the vc
mailing list