Skip to content
Snippets Groups Projects
Commit 667af369 authored by Heiko Schocher's avatar Heiko Schocher Committed by Tom Rini
Browse files

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: default avatarHeiko Schocher <hs@denx.de>
Reviewed-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: default avatarBo Shen <voice.shen@atmel.com>
Acked-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
parent 4dfd3605
No related branches found
No related tags found
No related merge requests found
...@@ -1188,7 +1188,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd) ...@@ -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, void (*hwctrl)(struct mtd_info *mtd, int cmd,
unsigned int ctrl) = this->cmd_ctrl; unsigned int ctrl) = this->cmd_ctrl;
while (this->dev_ready(&mtd)) while (!this->dev_ready(&mtd))
; ;
if (cmd == NAND_CMD_READOOB) { if (cmd == NAND_CMD_READOOB) {
...@@ -1213,7 +1213,7 @@ static int nand_command(int block, int page, uint32_t offs, u8 cmd) ...@@ -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_READSTART, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
hwctrl(&mtd, NAND_CMD_NONE, NAND_NCE | 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; return 0;
...@@ -1353,7 +1353,7 @@ int at91_nand_wait_ready(struct mtd_info *mtd) ...@@ -1353,7 +1353,7 @@ int at91_nand_wait_ready(struct mtd_info *mtd)
udelay(this->chip_delay); udelay(this->chip_delay);
return 0; return 1;
} }
int board_nand_init(struct nand_chip *nand) int board_nand_init(struct nand_chip *nand)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment