diff options
author | Wolfgang Denk <wd@denx.de> | 2009-03-23 10:29:19 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-23 10:29:19 +0100 |
commit | 181c3e46f81e5564cc43ab69adf450fb5b66eab4 (patch) | |
tree | cf1d67f20620ada39250e55c60010896cf2d4f35 | |
parent | de3ce8c59f48f99779d7d7379a5432ded12ec06c (diff) | |
parent | 3a3baf3ee61e6b28af3b49ebabc9ab4f6015aa48 (diff) | |
download | u-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.c | 4 |
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]) |