summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMingkai Hu <Mingkai.hu@freescale.com>2009-06-18 18:23:27 +0800
committerScott Wood <scottwood@freescale.com>2009-07-07 17:58:10 -0500
commit66372fe2ab11cdeb0e841ad9eb6ba79769db4909 (patch)
treefdb926c7f28e761cdfc60d2952f5eaae949c4c83 /drivers/mtd
parent1dac3a51875967f32641bbc0d26dc382ef02330a (diff)
downloadu-boot-imx-66372fe2ab11cdeb0e841ad9eb6ba79769db4909.zip
u-boot-imx-66372fe2ab11cdeb0e841ad9eb6ba79769db4909.tar.gz
u-boot-imx-66372fe2ab11cdeb0e841ad9eb6ba79769db4909.tar.bz2
fsl_elbc_nand: redirect the pointer of bbt pattern to RAM
The bbt descriptors contains the pointer to the bbt pattern which are statically initialized memory struct. When relocated to RAM, these pointers will continue point to NOR flash(or L2 SRAM, or other boot device). If the contents of NOR flash changed or L2 SRAM disabled, it'll hang the system. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/fsl_elbc_nand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 3f318e0..77a33c0 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -766,6 +766,9 @@ int board_nand_init(struct nand_chip *nand)
nand->waitfunc = fsl_elbc_wait;
/* set up nand options */
+ /* redirect the pointer of bbt pattern to RAM */
+ bbt_main_descr.pattern = bbt_pattern;
+ bbt_mirror_descr.pattern = mirror_pattern;
nand->bbt_td = &bbt_main_descr;
nand->bbt_md = &bbt_mirror_descr;
@@ -812,6 +815,7 @@ int board_nand_init(struct nand_chip *nand)
/* Large-page-specific setup */
if (or & OR_FCM_PGS) {
priv->page_size = 1;
+ largepage_memorybased.pattern = scan_ff_pattern;
nand->badblock_pattern = &largepage_memorybased;
/* adjust ecc setup if needed */