Omap35xxPkg/Flash: Fixed 'NandStatus may be used before being set'

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13753 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2012-09-27 13:41:04 +00:00
parent b34e4db382
commit bedf36d7b9
1 changed files with 2 additions and 0 deletions

View File

@ -411,6 +411,7 @@ NandWritePage (
NandSendCommand(PROGRAM_PAGE_CONFIRM_CMD); NandSendCommand(PROGRAM_PAGE_CONFIRM_CMD);
//Poll till device is busy. //Poll till device is busy.
NandStatus = 0;
while (Timeout) { while (Timeout) {
NandStatus = NandReadStatus(); NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) { if ((NandStatus & NAND_READY) == NAND_READY) {
@ -462,6 +463,7 @@ NandEraseBlock (
NandSendCommand(BLOCK_ERASE_CONFIRM_CMD); NandSendCommand(BLOCK_ERASE_CONFIRM_CMD);
//Poll till device is busy. //Poll till device is busy.
NandStatus = 0;
while (Timeout) { while (Timeout) {
NandStatus = NandReadStatus(); NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) { if ((NandStatus & NAND_READY) == NAND_READY) {