public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support
Date: Thu, 27 Feb 2014 15:02:33 -0600	[thread overview]
Message-ID: <1393534953.1993.6.camel@clsee-VirtualBox.altera.com> (raw)
In-Reply-To: <20140227233551.77C1.AA925319@jp.panasonic.com>

Hi Masahiro,

On Thu, 2014-02-27 at 23:35 +0900, Masahiro Yamada wrote:
> Hello Chin,
> 
> 
> > +
> > +	nand->ecc.mode = NAND_ECC_HW;
> > +	nand->ecc.size = CONFIG_NAND_DENALI_ECC_SIZE;
> > +	nand->ecc.read_oob = denali_read_oob;
> > +	nand->ecc.write_oob = denali_write_oob;
> > +	nand->ecc.read_page = denali_read_page;
> > +	nand->ecc.read_page_raw = denali_read_page_raw;
> > +	nand->ecc.write_page = denali_write_page;
> > +	nand->ecc.write_page_raw = denali_write_page_raw;
> > +#ifdef CONFIG_SYS_NAND_15BIT_HW_ECC_OOBFIRST
> > +	/* 15bit ECC */
> > +	nand->ecc.bytes = 26;
> > +	nand->ecc.layout = &nand_15bit_oob;
> > +#else	/* 8bit ECC */
> > +	nand->ecc.bytes = 14;
> > +	nand->ecc.layout = &nand_8bit_oob;
> > +#endif
> > +	nand->ecc.calculate = denali_ecc_calculate;
> > +	nand->ecc.correct  = denali_ecc_correct;
> > +	nand->ecc.hwctl  = denali_ecc_hwctl;
> 
> You set nand->ecc.mode = NAND_ECC_HW,
> but it looks like you don't set  nand->ecc.strength.
> 
> So, I think initialization will fail in nand_scan_tail() function.
> 
> Here,
> 
>                 if (mtd->writesize >= chip->ecc.size) {
>                         if (!chip->ecc.strength) {
>                                 pr_warn("Driver must set ecc.strength when using hardware ECC\n");
>                                 BUG();
>                         }
>                         break;
> 
> 
> 
> Where do you set nand->ecc.strength?

I believe this is only applicable for NAND_ECC_HW_SYNDROME mode. We are
using the NAND_ECC_HW (without the syndrome). Wonder you hit error
during run?

Chin Liang

> 
> 
> 
> 
> Best Regards
> Masahiro Yamada
> 
> 

  reply	other threads:[~2014-02-27 21:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 20:51 [U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support Chin Liang See
2014-02-24  7:48 ` Michal Simek
2014-02-24  8:06   ` Masahiro Yamada
2014-02-24  8:16     ` Michal Simek
2014-02-27 17:04   ` Chin Liang See
2014-02-28 10:37     ` Michal Simek
2014-03-04 23:57       ` Chin Liang See
2014-03-05  6:22         ` Michal Simek
2014-02-27 14:35 ` Masahiro Yamada
2014-02-27 21:02   ` Chin Liang See [this message]
2014-02-27 22:32     ` Scott Wood
2014-02-27 23:03       ` Chin Liang See
2014-02-28 12:57         ` Masahiro Yamada
2014-03-05  0:24           ` Chin Liang See
2014-03-04  0:03 ` Scott Wood
2014-03-04 10:31   ` Masahiro Yamada
2014-03-04 18:44     ` Scott Wood
2014-03-05 17:40     ` Chin Liang See
2014-03-05 17:34   ` Chin Liang See
2014-03-05 18:23     ` Scott Wood
2014-03-05 23:01       ` Chin Liang See
2014-03-05 23:04         ` Scott Wood
2014-03-05 23:09           ` Chin Liang See
2014-03-05 23:11             ` Scott Wood
2014-03-05 23:21               ` Chin Liang See
2014-05-30 10:50 ` Rik Smith
2014-05-30 11:36   ` Masahiro Yamada

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=1393534953.1993.6.camel@clsee-VirtualBox.altera.com \
    --to=clsee@altera.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