summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorVipin KUMAR <vipin.kumar@st.com>2012-05-07 13:00:23 +0530
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-07-07 14:07:38 +0200
commit0befe7d7a396339067ccb7018ab69a097ff62cf4 (patch)
treedb433cd8d5f47a61654203b90bf6688bcfacbd4a /drivers/mtd
parent69fcb55f71c9e2c40a0f1de6f70b26a9ec02cfb8 (diff)
downloadu-boot-imx-0befe7d7a396339067ccb7018ab69a097ff62cf4.zip
u-boot-imx-0befe7d7a396339067ccb7018ab69a097ff62cf4.tar.gz
u-boot-imx-0befe7d7a396339067ccb7018ab69a097ff62cf4.tar.bz2
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 <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/st_smi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index 2c6d59d..088c7c7 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;