From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fix fsl_elbc_nand driver
Date: Tue, 19 May 2015 16:40:14 -0500 [thread overview]
Message-ID: <1432071614.27761.77.camel@freescale.com> (raw)
In-Reply-To: <1432001789.14341.120.camel@andreilinux>
On Mon, 2015-05-18 at 19:16 -0700, Andrei Yakimov wrote:
> This is my best try. I have test it with my old u-boot,
> but not with master. Do not have a bench for it.
A bench?
> This is not very important patch. I do not find
> any other ONFI user in u-boot.
> Andrei
>
> From d76b4ae8e866affa15dd9da860574d0600969d57 Mon Sep 17 00:00:00 2001
> From: Andrei Yakimov <ayakimov@iptec-inc.com>
> Date: Mon, 18 May 2015 18:50:12 -0700
> Subject: [PATCH] ONFI detect reading only first parameter page.
>
> NAND_CMD_PARAM read only first parameter page. Need to read all 3
> (as per ONFI spec) due to no error correction for this area
>
> Signed-off-by: Andrei Yakimov <ayakimov@iptec-inc.com>
> ---
>
> drivers/mtd/nand/fsl_elbc_nand.c | 9 +++++----
> drivers/mtd/nand/fsl_ifc_nand.c | 10 ++++++----
> 2 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
> b/drivers/mtd/nand/fsl_elbc_nand.c
> index e85832d..8ac470f 100644
> --- a/drivers/mtd/nand/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -336,11 +336,12 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd,
> unsigned int command,
> (FIR_OP_RBW << FIR_OP2_SHIFT));
> out_be32(&lbc->fcr, command << FCR_CMD0_SHIFT);
> /*
> - * although currently it's 8 bytes for READID, we always read
> - * the maximum 256 bytes(for PARAM)
> + * although currently it's 8 bytes for READID
> + * param page containg at least 3 copy for
> + * robustnes, we need to read them all.
> */
> - out_be32(&lbc->fbcr, 256);
> - ctrl->read_bytes = 256;
> + out_be32(&lbc->fbcr, (command == NAND_CMD_PARAM) ? 786 : 8);
> + ctrl->read_bytes = (command == NAND_CMD_PARAM) ? 786 : 8;
786? Not 768?
-Scott
next prev parent reply other threads:[~2015-05-19 21:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 2:16 [U-Boot] Fix fsl_elbc_nand driver Andrei Yakimov
2015-05-19 21:40 ` Scott Wood [this message]
[not found] ` <1432074568.14341.149.camel@andreilinux>
[not found] ` <1432075134.27761.82.camel@freescale.com>
2015-05-19 23:42 ` Andrei Yakimov
2015-05-20 22:25 ` Scott Wood
2015-05-21 1:27 ` Andrei Yakimov
2015-05-21 1:37 ` Scott Wood
2015-05-21 1:55 ` Andrei Yakimov
2015-05-21 2:27 ` Scott Wood
2015-05-21 2:42 ` Andrei Yakimov
2015-05-21 2:46 ` Scott Wood
2015-05-21 3:03 ` Andrei Yakimov
2015-05-21 3:11 ` Scott Wood
2015-05-21 3:54 ` Andrei Yakimov
2015-05-21 3:57 ` 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=1432071614.27761.77.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.denx.de \
/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