From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v4] nand: Hack to support 4k page in fsl_elbc_nand
Date: Tue, 19 Feb 2013 17:46:35 -0600 [thread overview]
Message-ID: <20130219234635.GA606@home.buserror.net> (raw)
In-Reply-To: <CABXAApF_UuFKHgewU8WkL484RpRE92MnrqskPADTEK2V4hFueA@mail.gmail.com>
On Tue, Jul 03, 2012 at 11:07:26AM -0000, Rafael Beims wrote:
> Freescale FCM controller has a 2K size limitation of buffer RAM. In order
> to support the Nand flash chip with pagesize larger than 2K bytes,
> we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB and save
> them to a large buffer.
> Because of this, the in flash layout of the oob is different from the
> default for 4096kiB page sizes. Therefore, we need to migrate the
> factory bad block markers from the original position to the new layout.
>
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> Signed-off-by: Liu Shuo <b35362@freescale.com>
> Signed-off-by: Rafael Beims <rafael.beims@gmail.com>
>
> ---
> Changes in v2:
> - Added check to disallow the migration code to run in devices with
> page size <= 2048
>
> Changes in v3:
> - Corrected memset writing beyond newoob buffer
> - Corrected various code formatting errors
> - Cosmetic changes
> - Generated random magic number for migration marker
> - Removed direct references to nand_bbt.c code
> - Removed useless bbt free
> - Removed useless dir variable
> - Removed vmalloc and kmalloc calls. Only malloc() and free() used now
> - Start searching the migration marker from the end of NAND
>
> Changes in v4:
> - Read all the pages of the block until migrated marker is found
> - Write the marker in all pages of the block
>
> drivers/mtd/nand/fsl_elbc_nand.c | 443 +++++++++++++++++++++++++++++++++++---
> 1 files changed, 415 insertions(+), 28 deletions(-)
>
> "index %x, pes %d ps %d\n",
> @@ -256,13 +291,14 @@ static int fsl_elbc_run_command(struct mtd_info *mtd)
Sorry for the delay, but this patch is mangled and cannot be applied.
E.g. the above diff chunk is missing the header that indicates the file
it is for (I can guess, but "git am" can't, and it suggests that part of
the patch may be missing).
> @@ -295,6 +331,7 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd,
> unsigned int command,
There is also line wrapping.
I'd also like to see at least the larger portions of the code that this
adds be ifdeffed to avoid increasing image size further for boards that
don't need it.
-Scott
prev parent reply other threads:[~2013-02-19 23:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 21:07 [U-Boot] [PATCH v4] nand: Hack to support 4k page in fsl_elbc_nand Rafael Beims
2013-02-19 23:46 ` 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=20130219234635.GA606@home.buserror.net \
--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