[MTD] [NAND] Set the fsl elbc ECCM according the settings in bootloader.

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Dec 10 12:59:03 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=03ed107805aff09ae13e50a86ea929f12ff74eb7
Commit:     03ed107805aff09ae13e50a86ea929f12ff74eb7
Parent:     d3af0f048c114dd53713d5920c54f6d5b6b12139
Author:     Jason Jin <Jason.jin at freescale.com>
AuthorDate: Tue Dec 9 14:32:31 2008 +0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed Dec 10 16:44:28 2008 +0000

    [MTD] [NAND] Set the fsl elbc ECCM according the settings in bootloader.
    
    The ECCM maybe set in bootloader, Get ECCM settings from the bootloader,
    can avoid the image written by bootloader cannot read out by kernel.
    
    But the limitation of doing it this way is that, it could break large page
    NAND if it is written with NAND disabled in u-boot and read with NAND
    enabled, or vice versa.
    
    Signed-off-by: Jason Jin <Jason.jin at freescale.com>
    Acked-by: Scott Wood <scottwood at freescale.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/fsl_elbc_nand.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 4aa5bd6..65929db 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -777,7 +777,9 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
 	/* Fill in fsl_elbc_mtd structure */
 	priv->mtd.priv = chip;
 	priv->mtd.owner = THIS_MODULE;
-	priv->fmr = 0; /* rest filled in later */
+
+	/* Set the ECCM according to the settings in bootloader.*/
+	priv->fmr = in_be32(&lbc->fmr) & FMR_ECCM;
 
 	/* fill in nand_chip structure */
 	/* set up function call table */



More information about the linux-mtd-cvs mailing list