From: Vipin KUMAR Date: Mon, 7 May 2012 07:30:23 +0000 (+0530) Subject: st_smi: Read status until timeout happens X-Git-Tag: v2012.07-rc1~11^2~48 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0befe7d7a396339067ccb7018ab69a097ff62cf4;p=karo-tx-uboot.git st_smi: Read status until timeout happens 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 Signed-off-by: Amit Virdi Signed-off-by: Stefan Roese --- diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c index 2c6d59ddbb..088c7c7b7c 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;