forked from Imagelibrary/rtems
On configurations where multiple NAND chips are in use, the erasure loop in XNandPsu_Erase() can reset the loop counter variable once it gets to blocks in the second chip causing an infinite loop overwriting parts of the first chip. This change ensures that the loop counter is not accidentally reset.