summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValeriy Glushkov <gvv@lstec.com>2009-01-19 16:32:59 +0200
committerScott Wood <scottwood@freescale.com>2009-02-06 17:28:31 -0600
commitad09ab2e3ac28f304372eceb4a5cb4d24e102a13 (patch)
tree0b29b14b7a8cc23cb66d163e4f60135f7ebc1038
parent5a9427dc9b8438759db3f67a1e547062f76eb18d (diff)
downloadu-boot-imx-ad09ab2e3ac28f304372eceb4a5cb4d24e102a13.zip
u-boot-imx-ad09ab2e3ac28f304372eceb4a5cb4d24e102a13.tar.gz
u-boot-imx-ad09ab2e3ac28f304372eceb4a5cb4d24e102a13.tar.bz2
NAND: Fixed invalid pointers to static relocated chip names
Dear Wolfgang, You are right, the patch was ugly. The new one seems to be better. Signed-off-by: Valeriy Glushkov <gvv@lstec.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--drivers/mtd/nand/nand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index cf92617..70b605f 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -28,6 +28,8 @@
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#endif
+DECLARE_GLOBAL_DATA_PTR;
+
int nand_curr_device = -1;
nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
@@ -46,6 +48,8 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
if (nand_scan(mtd, 1) == 0) {
if (!mtd->name)
mtd->name = (char *)default_nand_name;
+ else
+ mtd->name += gd->reloc_off;
} else
mtd->name = NULL;
} else {