diff options
-rw-r--r-- | drivers/block/mg_disk.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index 5b120eab2baa..6440d5945414 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c | |||
@@ -219,6 +219,16 @@ static unsigned int mg_wait(struct mg_host *host, u32 expect, u32 msec) | |||
219 | host->error = MG_ERR_NONE; | 219 | host->error = MG_ERR_NONE; |
220 | expire = jiffies + msecs_to_jiffies(msec); | 220 | expire = jiffies + msecs_to_jiffies(msec); |
221 | 221 | ||
222 | /* These 2 times dummy status read prevents reading invalid | ||
223 | * status. A very little time (3 times of mflash operating clk) | ||
224 | * is required for busy bit is set. Use dummy read instead of | ||
225 | * busy wait, because mflash's PLL is machine dependent. | ||
226 | */ | ||
227 | if (prv_data->use_polling) { | ||
228 | status = inb((unsigned long)host->dev_base + MG_REG_STATUS); | ||
229 | status = inb((unsigned long)host->dev_base + MG_REG_STATUS); | ||
230 | } | ||
231 | |||
222 | status = inb((unsigned long)host->dev_base + MG_REG_STATUS); | 232 | status = inb((unsigned long)host->dev_base + MG_REG_STATUS); |
223 | 233 | ||
224 | do { | 234 | do { |