aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c4
-rw-r--r--drivers/mtd/nand/davinci_nand.c2
-rw-r--r--drivers/mtd/nand/nand_base.c7
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c b/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
index 86c9a79b89b3..595de4012e71 100644
--- a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
+++ b/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
@@ -17,8 +17,8 @@
17#include "bcm47xxnflash.h" 17#include "bcm47xxnflash.h"
18 18
19/* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has 19/* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has
20 * shown 164 retries as maxiumum. */ 20 * shown ~1000 retries as maxiumum. */
21#define NFLASH_READY_RETRIES 1000 21#define NFLASH_READY_RETRIES 10000
22 22
23#define NFLASH_SECTOR_SIZE 512 23#define NFLASH_SECTOR_SIZE 512
24 24
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 3502606f6480..feae55c7b880 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = {
523static const struct of_device_id davinci_nand_of_match[] = { 523static const struct of_device_id davinci_nand_of_match[] = {
524 {.compatible = "ti,davinci-nand", }, 524 {.compatible = "ti,davinci-nand", },
525 {}, 525 {},
526} 526};
527MODULE_DEVICE_TABLE(of, davinci_nand_of_match); 527MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
528 528
529static struct davinci_nand_pdata 529static struct davinci_nand_pdata
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 8323ac991ad1..3766682a0289 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2857,8 +2857,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2857 int i; 2857 int i;
2858 int val; 2858 int val;
2859 2859
2860 /* ONFI need to be probed in 8 bits mode */ 2860 /* ONFI need to be probed in 8 bits mode, and 16 bits should be selected with NAND_BUSWIDTH_AUTO */
2861 WARN_ON(chip->options & NAND_BUSWIDTH_16); 2861 if (chip->options & NAND_BUSWIDTH_16) {
2862 pr_err("Trying ONFI probe in 16 bits mode, aborting !\n");
2863 return 0;
2864 }
2862 /* Try ONFI for unknown chip or LP */ 2865 /* Try ONFI for unknown chip or LP */
2863 chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); 2866 chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1);
2864 if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || 2867 if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||