From: Scott Wood <scottwood@freescale.com>
To: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: linux-mtd@lists.infradead.org, kumar.gala@freescale.com,
linuxppc-dev@lists.ozlabs.org, dwmw2@infradead.org
Subject: Re: [PATCH 2/2 v2] mtd/nand: Add ONFI support for FSL NAND controller
Date: Tue, 6 Dec 2011 11:17:17 -0600 [thread overview]
Message-ID: <4EDE4E1D.4030408@freescale.com> (raw)
In-Reply-To: <1323161655-19050-2-git-send-email-Shengzhou.Liu@freescale.com>
On 12/06/2011 02:54 AM, Shengzhou Liu wrote:
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
> index 4f405a0..b4db407 100644
> --- a/drivers/mtd/nand/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -349,19 +349,24 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
> fsl_elbc_run_command(mtd);
> return;
>
> - /* READID must read all 5 possible bytes while CEB is active */
> case NAND_CMD_READID:
> - dev_vdbg(priv->dev, "fsl_elbc_cmdfunc: NAND_CMD_READID.\n");
> + case NAND_CMD_PARAM:
> + dev_vdbg(priv->dev, "fsl_elbc_cmdfunc: NAND_CMD %x\n", command);
>
> out_be32(&lbc->fir, (FIR_OP_CM0 << FIR_OP0_SHIFT) |
> (FIR_OP_UA << FIR_OP1_SHIFT) |
> (FIR_OP_RBW << FIR_OP2_SHIFT));
> - out_be32(&lbc->fcr, NAND_CMD_READID << FCR_CMD0_SHIFT);
> - /* nand_get_flash_type() reads 8 bytes of entire ID string */
> - out_be32(&lbc->fbcr, 8);
> - elbc_fcm_ctrl->read_bytes = 8;
> + out_be32(&lbc->fcr, command << FCR_CMD0_SHIFT);
> + /* reads 8 bytes of entire ID string */
> + if (NAND_CMD_READID == command) {
if (command == NAND_CMD_READID) {
> + out_be32(&lbc->fbcr, 8);
> + elbc_fcm_ctrl->read_bytes = 8;
> + } else {
> + out_be32(&lbc->fbcr, 256);
> + elbc_fcm_ctrl->read_bytes = 256;
> + }
Any harm in always using 256?
-Scott
next prev parent reply other threads:[~2011-12-06 17:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-06 8:54 [PATCH 1/2 v2] mtd/nand: fixup for fmr initialization of Freescale NAND controller Shengzhou Liu
2011-12-06 8:54 ` [PATCH 2/2 v2] mtd/nand: Add ONFI support for FSL " Shengzhou Liu
2011-12-06 17:17 ` Scott Wood [this message]
2011-12-07 3:16 ` Liu Shengzhou-B36685
2011-12-07 17:16 ` Scott Wood
2011-12-08 3:06 ` Liu Shengzhou-B36685
2011-12-06 17:16 ` [PATCH 1/2 v2] mtd/nand: fixup for fmr initialization of Freescale " Scott Wood
2011-12-07 6:30 ` Liu Shengzhou-B36685
2011-12-07 17:17 ` Scott Wood
2011-12-08 3:36 ` Liu Shengzhou-B36685
2011-12-08 18:00 ` Scott Wood
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=4EDE4E1D.4030408@freescale.com \
--to=scottwood@freescale.com \
--cc=Shengzhou.Liu@freescale.com \
--cc=dwmw2@infradead.org \
--cc=kumar.gala@freescale.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).