aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2012-02-16 22:22:37 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:38:37 -0400
commitd42b5de35fb058513367d1a9ee146be5aaab7c6a (patch)
tree0b121a7455b5ca3a64aad262cb2c01be5f69ee17 /drivers/mtd/nand/nand_base.c
parent921de864b7c6413f15224d8f5e677541e8e1ac6d (diff)
mtd: change the location of the ONFI detected log
Some strange nand chip(such as Hynix H27UBG8T2A) can pass the `ONFI` signature check. So the log can be printed out even it is not an ONFI nand indeed. Change this log to the end of the function. Print out the log only when we really detect an ONFI nand. Signed-off-by: Huang Shijie <b32955@freescale.com> Acked-by: Florian Fainelli <ffainelli@freebox.fr> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 5822e3a47ded..1e907dc8638a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2853,7 +2853,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2853 chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I') 2853 chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I')
2854 return 0; 2854 return 0;
2855 2855
2856 pr_info("ONFI flash detected\n");
2857 chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1); 2856 chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1);
2858 for (i = 0; i < 3; i++) { 2857 for (i = 0; i < 3; i++) {
2859 chip->read_buf(mtd, (uint8_t *)p, sizeof(*p)); 2858 chip->read_buf(mtd, (uint8_t *)p, sizeof(*p));
@@ -2903,6 +2902,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2903 chip->options |= (NAND_NO_READRDY | 2902 chip->options |= (NAND_NO_READRDY |
2904 NAND_NO_AUTOINCR) & NAND_CHIPOPTIONS_MSK; 2903 NAND_NO_AUTOINCR) & NAND_CHIPOPTIONS_MSK;
2905 2904
2905 pr_info("ONFI flash detected\n");
2906 return 1; 2906 return 1;
2907} 2907}
2908 2908