From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org, linux-sunxi@googlegroups.com,
Michal Suchanek <hramrach@gmail.com>
Subject: Re: [PATCH 4/4] mtd: nand: print full chip ID
Date: Thu, 30 Jul 2015 09:17:30 +0200 [thread overview]
Message-ID: <20150730091730.1774291d@bbrezillon> (raw)
In-Reply-To: <1438192434-18363-4-git-send-email-hdegoede@redhat.com>
Hans, Michal,
On Wed, 29 Jul 2015 19:53:54 +0200
Hans de Goede <hdegoede@redhat.com> wrote:
> From: Michal Suchanek <hramrach@gmail.com>
>
> Full chip ID is printed so user has data to paste from syslog in case
> of chip misidentification.
>
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/mtd/nand/nand_base.c | 28 +++++++++++++++++++++++-----
> 1 file changed, 23 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index e2e2690..13e9938 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -4243,7 +4243,7 @@ static inline bool is_full_id_nand(struct nand_flash_dev *type)
> }
>
> static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip,
> - struct nand_flash_dev *type, u8 *id_data, int *busw)
> + struct nand_flash_dev *type, const u8 *id_data, int *busw)
> {
> if (!strncmp(type->id, id_data, type->id_len)) {
> mtd->writesize = type->pagesize;
> @@ -4269,6 +4269,26 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip,
> }
>
> /*
> + * Print full detail of chip ID read from chip.
> + */
> +static void print_nand_chip_info(int maf_id, int dev_id, u8 id_data[8])
> +{
> + u8 delim[8] = { [0 ... 7] = ',' };
> +
> + pr_info("device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
> + maf_id, dev_id);
> +
> + delim[7] = ' ';
> + delim[nand_id_len(id_data, 8) - 1] = ';';
> +
> + pr_info("chip id data: 0x%02x%c 0x%02x%c 0x%02x%c 0x%02x%c 0x%02x%c 0x%02x%c 0x%02x%c 0x%02x%c\n",
> + id_data[0], delim[0], id_data[1], delim[1],
> + id_data[2], delim[2], id_data[3], delim[3],
> + id_data[4], delim[4], id_data[5], delim[5],
> + id_data[6], delim[6], id_data[7], delim[7]);
This looks like debug information to me, how about using pr_debug ?
Best Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-07-30 7:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 17:53 [PATCH 1/4] mtd: nand: Fix NAND_* options to use unique values Hans de Goede
2015-07-29 17:53 ` [PATCH 2/4] mtd: nand: nand_decode_ext_id(): Fill in ecc strength and size for Samsung Hans de Goede
2015-07-30 7:29 ` Boris Brezillon
2015-07-30 12:19 ` [linux-sunxi] " Hans de Goede
2015-07-29 17:53 ` [PATCH 3/4] mtd: nand: nand_get_flash_type: Print detected ECC strength and size Hans de Goede
2015-07-30 7:23 ` Boris Brezillon
2015-07-30 12:16 ` [linux-sunxi] " Hans de Goede
2015-07-29 17:53 ` [PATCH 4/4] mtd: nand: print full chip ID Hans de Goede
2015-07-29 23:37 ` [linux-sunxi] " Julian Calaby
2015-07-30 4:19 ` Michal Suchanek
2015-07-30 7:17 ` Boris Brezillon [this message]
2015-07-30 10:37 ` Michal Suchanek
2015-07-30 11:52 ` [PATCH v2] " Michal Suchanek
2015-07-30 12:15 ` Hans de Goede
2015-07-29 18:13 ` [PATCH 1/4] mtd: nand: Fix NAND_* options to use unique values Brian Norris
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=20150730091730.1774291d@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hdegoede@redhat.com \
--cc=hramrach@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox