[U-Boot] [PATCH V1 RESEND 05/12] st_smi: Read status until timeout happens

Amit Virdi amit.virdi at st.com
Mon May 7 09:30:23 CEST 2012


From: Vipin KUMAR <vipin.kumar at st.com>

SMI driver read status fails because the control register could not be
overwritten. Instead, the read status should be tried until timeout.

Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
Signed-off-by: Amit Virdi <amit.virdi at st.com>
---
 drivers/mtd/st_smi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index ce50fc1..7b4c6f3 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -187,7 +187,7 @@ static int smi_wait_till_ready(int bank, int timeout)
 	do {
 		sr = smi_read_sr(bank);
 		if (sr < 0)
-			break;
+			continue;	/* try until timeout */
 		else if (!(sr & WIP_BIT))
 			return 0;
 
-- 
1.7.2.2



More information about the U-Boot mailing list