summaryrefslogtreecommitdiffstats
path: root/Omap35xxPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-27 13:41:04 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-27 13:41:04 +0000
commitbedf36d7b9996cc6bd833fcdda8b0aa1e6b20777 (patch)
treee79259f6dec9c133b2334eba0c89d4f6a982945a /Omap35xxPkg
parentb34e4db38206407f13442b5f61cead6ce0d3c99c (diff)
downloadedk2-bedf36d7b9996cc6bd833fcdda8b0aa1e6b20777.tar.gz
edk2-bedf36d7b9996cc6bd833fcdda8b0aa1e6b20777.tar.bz2
edk2-bedf36d7b9996cc6bd833fcdda8b0aa1e6b20777.zip
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
Diffstat (limited to 'Omap35xxPkg')
-rw-r--r--Omap35xxPkg/Flash/Flash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Omap35xxPkg/Flash/Flash.c b/Omap35xxPkg/Flash/Flash.c
index dfe99b0167..0056acd6b9 100644
--- a/Omap35xxPkg/Flash/Flash.c
+++ b/Omap35xxPkg/Flash/Flash.c
@@ -411,6 +411,7 @@ NandWritePage (
NandSendCommand(PROGRAM_PAGE_CONFIRM_CMD);
//Poll till device is busy.
+ NandStatus = 0;
while (Timeout) {
NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) {
@@ -462,6 +463,7 @@ NandEraseBlock (
NandSendCommand(BLOCK_ERASE_CONFIRM_CMD);
//Poll till device is busy.
+ NandStatus = 0;
while (Timeout) {
NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) {