git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git]
/
drivers
/
mtd
/
nand
/
omap2.c
diff --git
a/drivers/mtd/nand/omap2.c
b/drivers/mtd/nand/omap2.c
index
0cd76f8
..
ebd07e9
100644
(file)
--- a/
drivers/mtd/nand/omap2.c
+++ b/
drivers/mtd/nand/omap2.c
@@
-11,6
+11,8
@@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
@@
-541,7
+543,7
@@
static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
mtd);
unsigned long timeo = jiffies;
struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
mtd);
unsigned long timeo = jiffies;
- int status, state = this->state;
+ int status
= NAND_STATUS_FAIL
, state = this->state;
if (state == FL_ERASING)
timeo += (HZ * 400) / 1000;
if (state == FL_ERASING)
timeo += (HZ * 400) / 1000;
@@
-556,8
+558,9
@@
static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
while (time_before(jiffies, timeo)) {
status = __raw_readb(this->IO_ADDR_R);
while (time_before(jiffies, timeo)) {
status = __raw_readb(this->IO_ADDR_R);
- if (
!(status & 0x40)
)
+ if (
status & NAND_STATUS_READY
)
break;
break;
+ cond_resched();
}
return status;
}
}
return status;
}