All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: <dwmw2@infradead.org>
Cc: Huang Shijie <b32955@freescale.com>,
	computersforpeace@gmail.com, linux-mtd@lists.infradead.org
Subject: [PATCH v2 5/5] mtd: nand: print out the right information for JEDEC compliant nand
Date: Sat, 8 Feb 2014 14:04:01 +0800	[thread overview]
Message-ID: <1391839441-21006-6-git-send-email-b32955@freescale.com> (raw)
In-Reply-To: <1391839441-21006-1-git-send-email-b32955@freescale.com>

Check the chip->jedec_version, and print out the right information
for JEDEC compliant nand.

Signed-off-by: Huang Shijie <b32955@freescale.com>
---
 drivers/mtd/nand/nand_base.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index eb9fb49..57443db 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3692,8 +3692,17 @@ ident_done:
 
 	pr_info("device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
 		*maf_id, *dev_id);
-	pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
-		chip->onfi_version ? chip->onfi_params.model : type->name);
+
+	if (chip->onfi_version)
+		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
+				chip->onfi_params.model);
+	else if (chip->jedec_version)
+		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
+				chip->jedec_params.model);
+	else
+		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
+				type->name);
+
 	pr_info("%dMiB, %s, page size: %d, OOB size: %d\n",
 		(int)(chip->chipsize >> 20), nand_is_slc(chip) ? "SLC" : "MLC",
 		mtd->writesize, mtd->oobsize);
-- 
1.7.2.rc3

  parent reply	other threads:[~2014-02-08  6:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08  6:03 [PATCH v2 0/5] mtd: nand: support the JEDEC compliant nand Huang Shijie
2014-02-08  6:03 ` [PATCH v2 1/5] mtd: nand: add the data structures for JEDEC parameter page Huang Shijie
2014-02-08  6:03 ` [PATCH v2 2/5] mtd: nand: add fields for JEDEC in nand_chip Huang Shijie
2014-02-11 20:36   ` Brian Norris
2014-02-08  6:03 ` [PATCH v2 3/5] mtd: nand: add a helper to get the supported features for JEDEC Huang Shijie
2014-02-08  6:04 ` [PATCH v2 4/5] mtd: nand: parse out the JEDEC compliant nand Huang Shijie
2014-02-11 20:32   ` Brian Norris
2014-02-14  7:08     ` Huang Shijie
2014-02-20  8:00       ` Brian Norris
2014-02-08  6:04 ` Huang Shijie [this message]
2014-02-11 20:43 ` [PATCH v2 0/5] mtd: nand: support " Brian Norris
2014-02-14  6:47   ` Huang Shijie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391839441-21006-6-git-send-email-b32955@freescale.com \
    --to=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.