diff options
| author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-11-14 16:25:27 -0500 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2014-01-03 14:22:11 -0500 |
| commit | 56704d857ac9a1044ec58cfe0ff95dc6bdbd9d58 (patch) | |
| tree | 8b2b52354f65f56a14191a83f25cb018eb9ef138 | |
| parent | 55d9fd6e94caf5f30d027f49bd0a4955bc6b3a8c (diff) | |
mtd: nand: pxa3xx: Use waitfunc() to wait for the device to be ready
In pxa3xx_nand_sensing() instead of simply using info->is_ready
after issuing a command, the correct way of checking is to wait
for the device to be ready through the chip's waitfunc().
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
| -rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index b3c5c69269bc..a30116bfff4d 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
| @@ -1036,10 +1036,11 @@ static int pxa3xx_nand_sensing(struct pxa3xx_nand_info *info) | |||
| 1036 | return ret; | 1036 | return ret; |
| 1037 | 1037 | ||
| 1038 | chip->cmdfunc(mtd, NAND_CMD_RESET, 0, 0); | 1038 | chip->cmdfunc(mtd, NAND_CMD_RESET, 0, 0); |
| 1039 | if (!info->need_wait) | 1039 | ret = chip->waitfunc(mtd, chip); |
| 1040 | return 0; | 1040 | if (ret & NAND_STATUS_FAIL) |
| 1041 | return -ENODEV; | ||
| 1041 | 1042 | ||
| 1042 | return -ENODEV; | 1043 | return 0; |
| 1043 | } | 1044 | } |
| 1044 | 1045 | ||
| 1045 | static int pxa3xx_nand_scan(struct mtd_info *mtd) | 1046 | static int pxa3xx_nand_scan(struct mtd_info *mtd) |
