From: Scott Wood <scottwood@freescale.com>
To: Liu Shengzhou-B36685 <B36685@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
Gala Kumar-B11780 <B11780@freescale.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/2 v2] mtd/nand: fixup for fmr initialization of Freescale NAND controller
Date: Wed, 7 Dec 2011 11:17:16 -0600 [thread overview]
Message-ID: <4EDF9F9C.7050702@freescale.com> (raw)
In-Reply-To: <3F453DDFF675A64A89321A1F352810216B0787@039-SN1MPN1-005.039d.mgd.msft.net>
On 12/07/2011 12:30 AM, Liu Shengzhou-B36685 wrote:
>
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Wednesday, December 07, 2011 1:16 AM
>> To: Liu Shengzhou-B36685
>> Cc: linuxppc-dev@lists.ozlabs.org; linux-mtd@lists.infradead.org;
>> dwmw2@infradead.org; Gala Kumar-B11780
>> Subject: Re: [PATCH 1/2 v2] mtd/nand: fixup for fmr initialization of
>> Freescale NAND controller
>>
>> On 12/06/2011 02:54 AM, Shengzhou Liu wrote:
>>> There was a bug for fmr initialization, which lead to fmr was always
>>> 0x100 in fsl_elbc_chip_init() and caused FCM command timeout before
>>> calling fsl_elbc_chip_init_tail(), now we initialize CWTO to maximum
>>> timeout value and not relying on the setting of bootloader.
>>>
>>> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
>>> ---
>>> v2: make fmr not relying on the setting of bootloader.
>>>
>>> drivers/mtd/nand/fsl_elbc_nand.c | 10 +++++-----
>>> 1 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
>>> b/drivers/mtd/nand/fsl_elbc_nand.c
>>> index eedd8ee..4f405a0 100644
>>> --- a/drivers/mtd/nand/fsl_elbc_nand.c
>>> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
>>> @@ -659,9 +659,7 @@ static int fsl_elbc_chip_init_tail(struct mtd_info
>> *mtd)
>>> if (chip->pagemask & 0xff000000)
>>> al++;
>>>
>>> - /* add to ECCM mode set in fsl_elbc_init */
>>> - priv->fmr |= (12 << FMR_CWTO_SHIFT) | /* Timeout > 12 ms */
>>> - (al << FMR_AL_SHIFT);
>>> + priv->fmr |= al << FMR_AL_SHIFT;
>>>
>>> dev_dbg(priv->dev, "fsl_elbc_init: nand->numchips = %d\n",
>>> chip->numchips);
>>> @@ -764,8 +762,10 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd
>> *priv)
>>> priv->mtd.priv = chip;
>>> priv->mtd.owner = THIS_MODULE;
>>>
>>> - /* Set the ECCM according to the settings in bootloader.*/
>>> - priv->fmr = in_be32(&lbc->fmr) & FMR_ECCM;
>>> + /* set timeout to maximum */
>>> + priv->fmr = 15 << FMR_CWTO_SHIFT;
>>> + if (in_be32(&lbc->bank[priv->bank].or) & OR_FCM_PGS)
>>> + priv->fmr |= FMR_ECCM;
>>
>> Please do not change the way ECCM is handled. We probably should have
>> done it this way from the start, but at this point it breaks
>> compatibility if you have a large page flash and the firmware didn't
>> touch NAND.
>>
>> -Scott
> [Shengzhou] This patch doesn't change the way ECCM is handled, it's still same as before, just make sure CWTO timeout is set to maximum.
It does change it. It used to use the existing value in FMR, and now it
sets it based on ORn[PGS].
-Scott
next prev parent reply other threads:[~2011-12-07 17:18 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
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 [this message]
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=4EDF9F9C.7050702@freescale.com \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=B11780@freescale.com \
--cc=B36685@freescale.com \
--cc=dwmw2@infradead.org \
--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).