summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-11-27 14:11:37 +0100
committerScott Wood <scottwood@freescale.com>2008-12-02 13:48:15 -0600
commit5e46b1e54112f4b7fd5185665e571510132c12a7 (patch)
treed4e75ac0932de26ce7aa07aa1b734f842615f80c /common
parent2077e348c2a84901022ad95311b47b70361e6daa (diff)
downloadu-boot-imx-5e46b1e54112f4b7fd5185665e571510132c12a7.zip
u-boot-imx-5e46b1e54112f4b7fd5185665e571510132c12a7.tar.gz
u-boot-imx-5e46b1e54112f4b7fd5185665e571510132c12a7.tar.bz2
OneNAND: Add missing mtd info struct before calling onenand_erase()
Without this patch "saveenv" crashes when MTD partitions are enabled (e.g. for use in UBI) via CONFIG_MTD_PARTITIONS. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/env_onenand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 3c65b3e..dbccc79 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -97,6 +97,7 @@ int saveenv(void)
instr.len = CONFIG_ENV_SIZE;
instr.addr = env_addr;
+ instr.mtd = &onenand_mtd;
if (onenand_erase(&onenand_mtd, &instr)) {
printf("OneNAND: erase failed at 0x%08lx\n", env_addr);
return 1;