diff options
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 01505406ca7b..95d56ed8500a 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -3329,6 +3329,8 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, | |||
3329 | return PTR_ERR(type); | 3329 | return PTR_ERR(type); |
3330 | } | 3330 | } |
3331 | 3331 | ||
3332 | chip->select_chip(mtd, -1); | ||
3333 | |||
3332 | /* Check for a chip array */ | 3334 | /* Check for a chip array */ |
3333 | for (i = 1; i < maxchips; i++) { | 3335 | for (i = 1; i < maxchips; i++) { |
3334 | chip->select_chip(mtd, i); | 3336 | chip->select_chip(mtd, i); |
@@ -3338,8 +3340,11 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, | |||
3338 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); | 3340 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); |
3339 | /* Read manufacturer and device IDs */ | 3341 | /* Read manufacturer and device IDs */ |
3340 | if (nand_maf_id != chip->read_byte(mtd) || | 3342 | if (nand_maf_id != chip->read_byte(mtd) || |
3341 | nand_dev_id != chip->read_byte(mtd)) | 3343 | nand_dev_id != chip->read_byte(mtd)) { |
3344 | chip->select_chip(mtd, -1); | ||
3342 | break; | 3345 | break; |
3346 | } | ||
3347 | chip->select_chip(mtd, -1); | ||
3343 | } | 3348 | } |
3344 | if (i > 1) | 3349 | if (i > 1) |
3345 | pr_info("%d NAND chips detected\n", i); | 3350 | pr_info("%d NAND chips detected\n", i); |
@@ -3598,9 +3603,6 @@ int nand_scan_tail(struct mtd_info *mtd) | |||
3598 | /* Initialize state */ | 3603 | /* Initialize state */ |
3599 | chip->state = FL_READY; | 3604 | chip->state = FL_READY; |
3600 | 3605 | ||
3601 | /* De-select the device */ | ||
3602 | chip->select_chip(mtd, -1); | ||
3603 | |||
3604 | /* Invalidate the pagebuffer reference */ | 3606 | /* Invalidate the pagebuffer reference */ |
3605 | chip->pagebuf = -1; | 3607 | chip->pagebuf = -1; |
3606 | 3608 | ||