summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-10-31 08:31:03 +0100
committerTom Rini <trini@ti.com>2014-11-17 08:47:17 -0500
commit667af36905157b65fd79493e7f821db606ebbd33 (patch)
tree10f5fec7d716ad5e96ad0a084ef8a3258ed205be /drivers
parent4dfd36058955550d4a82787a3d2e548faf404f73 (diff)
downloadu-boot-imx-667af36905157b65fd79493e7f821db606ebbd33.zip
u-boot-imx-667af36905157b65fd79493e7f821db606ebbd33.tar.gz
u-boot-imx-667af36905157b65fd79493e7f821db606ebbd33.tar.bz2
spl, mtd, nand, atmel_nand: invert device ready pin logic
device ready pin is signalling that the device is ready on state 1 not on 0. Simmiliar as it is in drivers/mtd/nand/nand_spl_simple.c Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Bo Shen <voice.shen@atmel.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/atmel_nand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index d6d6f85..3b6093a 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1188,7 +1188,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd)
void (*hwctrl)(struct mtd_info *mtd, int cmd,
unsigned int ctrl) = this->cmd_ctrl;
- while (this->dev_ready(&mtd))
+ while (!this->dev_ready(&mtd))
;
if (cmd == NAND_CMD_READOOB) {
@@ -1213,7 +1213,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd)
hwctrl(&mtd, NAND_CMD_READSTART, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
hwctrl(&mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
- while (this->dev_ready(&mtd))
+ while (!this->dev_ready(&mtd))
;
return 0;
@@ -1353,7 +1353,7 @@ int at91_nand_wait_ready(struct mtd_info *mtd)
udelay(this->chip_delay);
- return 0;
+ return 1;
}
int board_nand_init(struct nand_chip *nand)