From: Huang Shijie <shijie8@gmail.com>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Huang Shijie <b32955@freescale.com>,
MTD Maling List <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: introduce a macro for max NAND ID sequence length
Date: Thu, 14 Mar 2013 22:32:44 -0400 [thread overview]
Message-ID: <5142884C.9090206@gmail.com> (raw)
In-Reply-To: <1363247938-2915-1-git-send-email-dedekind1@gmail.com>
于 2013年03月14日 03:58, Artem Bityutskiy 写道:
> From: Artem Bityutskiy<artem.bityutskiy@linux.intel.com>
>
> Introduce a helpful macro for the maximum NAND ID sequence length instead of
> using the "8" magic number.
>
> Signed-off-by: Artem Bityutskiy<artem.bityutskiy@linux.intel.com>
> ---
> include/linux/mtd/nand.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index e2c7173..33516eb 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -542,6 +542,9 @@ struct nand_chip {
> #define NAND_MFR_MACRONIX 0xc2
> #define NAND_MFR_EON 0x92
>
> +/* The maximum expected count of bytes in the NAND ID sequence */
> +#define NAND_MAX_ID_LEN 8
> +
> /*
> * A helper for defining older NAND chips where the second ID byte fully
> * defined the chip, including the geometry (chip size, eraseblock size, page
> @@ -589,7 +592,7 @@ struct nand_flash_dev {
> uint8_t mfr_id;
> uint8_t dev_id;
> };
> - uint8_t id[8];
> + uint8_t id[NAND_MAX_ID_LEN];
> };
> unsigned int pagesize;
> unsigned int chipsize;
I also thought we should add a macro for the length of the id data.
Acked-by: Huang Shijie <shijie8@gmail.com>
prev parent reply other threads:[~2013-03-14 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 7:58 [PATCH] mtd: introduce a macro for max NAND ID sequence length Artem Bityutskiy
2013-03-15 2:32 ` Huang Shijie [this message]
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=5142884C.9090206@gmail.com \
--to=shijie8@gmail.com \
--cc=b32955@freescale.com \
--cc=dedekind1@gmail.com \
--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.