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: Thu, 8 Dec 2011 12:00:28 -0600 [thread overview]
Message-ID: <4EE0FB3C.6050608@freescale.com> (raw)
In-Reply-To: <3F453DDFF675A64A89321A1F352810216B089C@039-SN1MPN1-005.039d.mgd.msft.net>
On 12/07/2011 09:36 PM, Liu Shengzhou-B36685 wrote:
>
>
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Thursday, December 08, 2011 1:17 AM
>> To: Liu Shengzhou-B36685
>> Cc: Wood Scott-B07421; 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/07/2011 12:30 AM, Liu Shengzhou-B36685 wrote:
>>> [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
>
> [Shengzhou]
> In u-boot:
> #ifdef CONFIG_FSL_ELBC_FMR
> priv->fmr = CONFIG_FSL_ELBC_FMR;
> #else
> priv->fmr = (15 << FMR_CWTO_SHIFT) | (2 << FMR_AL_SHIFT);
> or = in_be32(&elbc_ctrl->regs->bank[priv->bank].or);
> if (or & OR_FCM_PGS)
> priv->fmr |= FMR_ECCM;
> #endif
>
> In kernel: It used to be " priv->fmr = in_be32(&lbc->fmr) & FMR_ECCM
> ", so fmr was always 0x100(or 0,depend on ORn[PGS]), CWTO was
> 0(timeout was minimum). In this patch, for not relying on
> bootloader, fmr is initialized as what u-boot does, except
> FMR_AL_SHIFT is handled in fsl_elbc_chip_init_tail and without
> definition of CONFIG_FSL_ELBC_FMR.
>
> So, it doesn't change it.
You're assuming that the above U-Boot code is always run. This depends
on whether the NAND driver is enabled in U-Boot.
In the future, though, it might also depend on whether a NAND command is
actually run in U-Boot -- this makes the setting of FMR
non-deterministic between boots, which is worse than a one-time breakage
of an unusual setup (driver not enabled in U-Boot at all).
So it is a change, but I now think it's a change we should make. The
changelog should mention that this is happening, though.
> Do we still need CONFIG_FSL_ELBC_FMR in kernel?
We do not want such a compile-time constant in the kernel. Use ORn[PGS]
as the patch currently does.
-Scott
prev parent reply other threads:[~2011-12-08 18:00 UTC|newest]
Thread overview: 15+ 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 3:16 ` Liu Shengzhou-B36685
2011-12-07 17:16 ` Scott Wood
2011-12-08 3:06 ` Liu Shengzhou-B36685
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 6:30 ` Liu Shengzhou-B36685
2011-12-07 17:17 ` Scott Wood
2011-12-08 3:36 ` Liu Shengzhou-B36685
2011-12-08 3:36 ` Liu Shengzhou-B36685
2011-12-08 18:00 ` Scott Wood [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=4EE0FB3C.6050608@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 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.