Skip to contentSkip to conversation

Set the fsl elbc ECCM according the settings in bootloader.

PATCH In review Jason Jin 3 participants 3 messages Dec 8, 2008 – Jan 6, 2009

Subsystems (2)
lore
Share & tools
lore

Jason Jin

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/nand/fsl_elbc_nand.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/mtd/nand/fsl_elbc_nand.c +3 -1
index 4aa5bd6..65929db 100644
@@ -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 */
Signature · 1 line
1.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jason Jin

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.

Please send to David Woodhouse and the linux-mtd list.

-Scott

#2 lore raw

PATCH 1/1 Set the fsl elbc ECCM according the settings in bootloader.

In reply to Jason Jin

Begin forwarded message:

Quoted 34 lines

From: Jason Jin <[email protected]>
Date: December 7, 2008 9:41:03 PM CST
To: [email protected]
Cc: [email protected], [email protected], Jason Jin <[email protected]

Quoted 1 line

Subject: [PATCH] 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.

---
drivers/mtd/nand/fsl_elbc_nand.c | 4 +++-

1 files changed, 3 insertions(+), 1 deletions(-)
drivers/mtd/nand/fsl_elbc_nand.c +3 -1
index 4aa5bd6..65929db 100644
@@ -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 */
Quoted 3 lines
	/* set up function call table */
Signature · 1 line
1.5.4

This patch seems to have gotten lost on the linuxppc-dev list. Wanted to make sure you saw it (would be nice for .29) (or if you Ack I'll deal w/it via the powerpc tree)

- k