diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2005-07-15 09:53:51 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-07-16 03:27:52 -0400 |
commit | 19870da7ea2fc483bf73a189046a430fd9b01391 (patch) | |
tree | 3f8d07e75dc9895c52c2184d28e3c43a84b0234b /drivers/mtd/nand/nand_base.c | |
parent | 2c4eec9802ae753a4973f0a0d71f8d154e86fd31 (diff) |
[MTD] NAND: Fix broken bad block scan for 16 bit devices
The previous change to read a single byte from oob breaks the
bad block scan on 16 bit devices, when the byte is on an odd
address. Read the complete oob for now.
Remove the unused arguments from check_short_pattern()
Move the wait for ready function so it is only executed when
consecutive reads happen.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 1bd71a598c79..eee5115658c8 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -59,7 +59,7 @@ | |||
59 | * The AG-AND chips have nice features for speed improvement, | 59 | * The AG-AND chips have nice features for speed improvement, |
60 | * which are not supported yet. Read / program 4 pages in one go. | 60 | * which are not supported yet. Read / program 4 pages in one go. |
61 | * | 61 | * |
62 | * $Id: nand_base.c,v 1.146 2005/06/17 15:02:06 gleixner Exp $ | 62 | * $Id: nand_base.c,v 1.147 2005/07/15 07:18:06 gleixner Exp $ |
63 | * | 63 | * |
64 | * This program is free software; you can redistribute it and/or modify | 64 | * This program is free software; you can redistribute it and/or modify |
65 | * it under the terms of the GNU General Public License version 2 as | 65 | * it under the terms of the GNU General Public License version 2 as |
@@ -1409,16 +1409,6 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t | |||
1409 | thislen = min_t(int, thislen, len); | 1409 | thislen = min_t(int, thislen, len); |
1410 | this->read_buf(mtd, &buf[i], thislen); | 1410 | this->read_buf(mtd, &buf[i], thislen); |
1411 | i += thislen; | 1411 | i += thislen; |
1412 | |||
1413 | /* Apply delay or wait for ready/busy pin | ||
1414 | * Do this before the AUTOINCR check, so no problems | ||
1415 | * arise if a chip which does auto increment | ||
1416 | * is marked as NOAUTOINCR by the board driver. | ||
1417 | */ | ||
1418 | if (!this->dev_ready) | ||
1419 | udelay (this->chip_delay); | ||
1420 | else | ||
1421 | nand_wait_ready(mtd); | ||
1422 | 1412 | ||
1423 | /* Read more ? */ | 1413 | /* Read more ? */ |
1424 | if (i < len) { | 1414 | if (i < len) { |
@@ -1432,6 +1422,16 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t | |||
1432 | this->select_chip(mtd, chipnr); | 1422 | this->select_chip(mtd, chipnr); |
1433 | } | 1423 | } |
1434 | 1424 | ||
1425 | /* Apply delay or wait for ready/busy pin | ||
1426 | * Do this before the AUTOINCR check, so no problems | ||
1427 | * arise if a chip which does auto increment | ||
1428 | * is marked as NOAUTOINCR by the board driver. | ||
1429 | */ | ||
1430 | if (!this->dev_ready) | ||
1431 | udelay (this->chip_delay); | ||
1432 | else | ||
1433 | nand_wait_ready(mtd); | ||
1434 | |||
1435 | /* Check, if the chip supports auto page increment | 1435 | /* Check, if the chip supports auto page increment |
1436 | * or if we have hit a block boundary. | 1436 | * or if we have hit a block boundary. |
1437 | */ | 1437 | */ |