Skip to contentSkip to conversation

mtd : change the location of the ONFI detected log

PATCH New Huang Shijie 4 participants 4 messages Feb 17, 2012 – Feb 29, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/nand_base.c +1 -1
index 5822e3a..1e907dc 100644
@@ -2853,7 +2853,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
 		chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I')
 		return 0;
 
-	pr_info("ONFI flash detected\n");
 	chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1);
 	for (i = 0; i < 3; i++) {
 		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,
 	chip->options |= (NAND_NO_READRDY |
 			NAND_NO_AUTOINCR) & NAND_CHIPOPTIONS_MSK;
 
+	pr_info("ONFI flash detected\n");
 	return 1;
 }
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 mtd : change the location of the ONFI detected log

Le 02/17/12 04:22, Huang Shijie a ?crit :

Quoted 7 lines

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.

Quoted 24 lines
---
  drivers/mtd/nand/nand_base.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/nand_base.c +1 -1
index 5822e3a..1e907dc 100644
@@ -2853,7 +2853,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
  		chip->read_byte(mtd) != 'F' || chip->read_byte(mtd) != 'I')
  		return 0;
 
-	pr_info("ONFI flash detected\n");
  	chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1);
  	for (i = 0; i<  3; i++) {
  		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,
  	chip->options |= (NAND_NO_READRDY |
  			NAND_NO_AUTOINCR)&  NAND_CHIPOPTIONS_MSK;
 
+	pr_info("ONFI flash detected\n");
  	return 1;
  }
 
#2 lore raw

PATCH 1/1 mtd : change the location of the ONFI detected log

In reply to Huang Shijie
Quoted 7 lines · Huang Shijie

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.

#3 lore raw

PATCH 1/1 mtd : change the location of the ONFI detected log

In reply to Huang Shijie
Quoted 7 lines · Huang Shijie

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.

Pushed to l2-mtd.git, thanks!

Signature · 20 lines
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120229/fe599200/attachment.sig>
-------------- next part --------------
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.