summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-03-23 10:29:19 +0100
committerWolfgang Denk <wd@denx.de>2009-03-23 10:29:19 +0100
commit181c3e46f81e5564cc43ab69adf450fb5b66eab4 (patch)
treecf1d67f20620ada39250e55c60010896cf2d4f35
parentde3ce8c59f48f99779d7d7379a5432ded12ec06c (diff)
parent3a3baf3ee61e6b28af3b49ebabc9ab4f6015aa48 (diff)
downloadu-boot-imx-181c3e46f81e5564cc43ab69adf450fb5b66eab4.zip
u-boot-imx-181c3e46f81e5564cc43ab69adf450fb5b66eab4.tar.gz
u-boot-imx-181c3e46f81e5564cc43ab69adf450fb5b66eab4.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
-rw-r--r--drivers/mtd/cfi_flash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 391d169..631b969 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2009,7 +2009,9 @@ unsigned long flash_init (void)
#endif
#ifdef CONFIG_SYS_FLASH_PROTECTION
- char *s = getenv("unlock");
+ /* read environment from EEPROM */
+ char s[64];
+ getenv_r ("unlock", s, sizeof(s));
#endif
#define BANK_BASE(i) (((phys_addr_t [CFI_MAX_FLASH_BANKS])CONFIG_SYS_FLASH_BANKS_LIST)[i])