From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] mtd/nand: Fix IFC driver to support 2K NAND page
Date: Wed, 28 Dec 2011 07:46:34 +0100 [thread overview]
Message-ID: <201112280746.35094.marek.vasut@gmail.com> (raw)
In-Reply-To: <1325049801-7363-1-git-send-email-prabhakar@freescale.com>
> 1) OOB area should be updated irrespective of NAND page size. Earlier it
> was updated only for 512byte NAND page.
>
> 2) During OOB update fbcr should be equal to OOB size.
Cool, does the IFC driver have any relationship with the linux one? Is this
patch pulled from Linux or is this standalone/unrelated change?
Also, you can just specify commit (or even better, rebase on top of HEAD), you
don't need to specify whole commit message.
M
>
> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Based upon git://git.denx.de/u-boot.git (branch master)
>
> Top commit:
> commit bfcc40bb09b05c90cc3b1496abb270eb8aa72134
> Merge: cba9a89 1895420
> Author: Wolfgang Denk <wd@denx.de>
> Date: Fri Dec 23 20:53:58 2011 +0100
>
> Merge branch 'next' of ../next
>
> * 'next' of ../next:
> mkenvimage: Add version info switch (-V)
> mkenvimage: Fix getopt() error handling
> mkenvimage: Fix some typos
> phy: add Micrel KS8721BL phy definition
> net: introduce per device index
> mvgbe: remove setting of ethaddr within the driver
> x86: Add support for specifying an initrd with the zboot
> command x86: Refactor the zboot innards so they can be reused with a vboot
> image x86: Add infrastructure to extract an e820 table from the coreboot
> tables x86: Add support for booting Linux using the 32 bit boot protocol
> x86: Clean up the x86 zimage code in preparation to extend it x86: Import
> code from coreboot's libpayload to parse the coreboot table x86: Initial
> commit for running as a coreboot payload CHECKPATCH:
> ./board/esd/hh405/logo_320_240_8bpp.c
> CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c
> CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c
> CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c
> CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c
> CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c
> CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c
> CHECKPATCH: ./board/esd/hh405/fpgadata.c
> CHECKPATCH: ./board/esd/pci405/fpgadata.c
> CHECKPATCH: ./board/esd/tasreg/fpgadata.c
>
> drivers/mtd/nand/fsl_ifc_nand.c | 17 +++++++++--------
> 1 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/nand/fsl_ifc_nand.c
> b/drivers/mtd/nand/fsl_ifc_nand.c index 3a28ab8..56ae66a 100644
> --- a/drivers/mtd/nand/fsl_ifc_nand.c
> +++ b/drivers/mtd/nand/fsl_ifc_nand.c
> @@ -450,13 +450,7 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd,
> unsigned int command, out_be32(&ifc->ifc_nand.nand_fir1,
> (IFC_FIR_OP_CW1 << IFC_NAND_FIR1_OP5_SHIFT));
>
> - if (column >= mtd->writesize) {
> - /* OOB area --> READOOB */
> - column -= mtd->writesize;
> - nand_fcr0 |= NAND_CMD_READOOB <<
> - IFC_NAND_FCR0_CMD0_SHIFT;
> - ctrl->oob = 1;
> - } else if (column < 256) {
> + if (column < 256) {
> /* First 256 bytes --> READ0 */
> nand_fcr0 |= NAND_CMD_READ0 << FCR_CMD0_SHIFT;
> } else {
> @@ -465,6 +459,12 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd,
> unsigned int command, }
> }
>
> + if (column >= mtd->writesize) {
> + /* OOB area --> READOOB */
> + column -= mtd->writesize;
> + ctrl->oob = 1;
> + }
> +
> out_be32(&ifc->ifc_nand.nand_fcr0, nand_fcr0);
> set_addr(mtd, column, page_addr, ctrl->oob);
> return;
> @@ -473,7 +473,8 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd,
> unsigned int command, /* PAGEPROG reuses all of the setup from SEQIN and
> adds the length */ case NAND_CMD_PAGEPROG:
> if (ctrl->oob)
> - out_be32(&ifc->ifc_nand.nand_fbcr, ctrl->index);
> + out_be32(&ifc->ifc_nand.nand_fbcr,
> + ctrl->index - ctrl->column);
> else
> out_be32(&ifc->ifc_nand.nand_fbcr, 0);
next prev parent reply other threads:[~2011-12-28 6:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 5:23 [U-Boot] [PATCH 2/2] mtd/nand: Fix IFC driver to support 2K NAND page Prabhakar Kushwaha
2011-12-28 6:46 ` Marek Vasut [this message]
2011-12-28 7:11 ` Kushwaha Prabhakar-B32579
2012-01-04 21:51 ` 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=201112280746.35094.marek.vasut@gmail.com \
--to=marek.vasut@gmail.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