diff options
Diffstat (limited to 'env')
-rw-r--r-- | env/Kconfig | 5 | ||||
-rw-r--r-- | env/mtd.c | 8 | ||||
-rw-r--r-- | env/nand.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/env/Kconfig b/env/Kconfig index c667e8f2da1..adea277470f 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -635,7 +635,7 @@ config ENV_OFFSET_REDUND config ENV_OFFSET_REDUND_RELATIVE_END bool "Offset is relative to the end of the partition" - depends on SYS_REDUNDAND_ENVIRONMENT + depends on ENV_REDUNDANT depends on ENV_IS_IN_MMC help Treat the redundant environment offset as relative to the end of the @@ -732,7 +732,7 @@ config ENV_MMC_USE_SW_PARTITION depends on ENV_IS_IN_MMC config ENV_MMC_SW_PARTITION - bool "SD/MMC environment software partition name" + string "SD/MMC environment software partition name" depends on ENV_MMC_USE_SW_PARTITION help SD/MMC software partition name used to save environment variables. @@ -957,6 +957,7 @@ config USE_BOOTFILE config BOOTFILE string "'bootfile' environment variable value" + default kernel.itb if SPL_ATF && TARGET_SOCFPGA_SOC64 depends on USE_BOOTFILE help The value to set the "bootfile" variable to. diff --git a/env/mtd.c b/env/mtd.c index d7ec30e183a..b26ee80985a 100644 --- a/env/mtd.c +++ b/env/mtd.c @@ -131,6 +131,8 @@ static int env_mtd_save(void) puts("done\n"); done: + put_mtd_device(mtd_env); + if (saved_buf) free(saved_buf); @@ -188,6 +190,8 @@ static int env_mtd_load(void) gd->env_valid = ENV_VALID; out: + put_mtd_device(mtd_env); + free(buf); return ret; @@ -197,7 +201,7 @@ static int env_mtd_erase(void) { struct mtd_info *mtd_env; u32 sect_size, sect_num; - char *saved_buf, *tmp; + char *saved_buf = NULL, *tmp; struct erase_info ei; size_t ret_len; int remaining; @@ -280,6 +284,8 @@ static int env_mtd_erase(void) ret = 0; done: + put_mtd_device(mtd_env); + if (saved_buf) free(saved_buf); diff --git a/env/nand.c b/env/nand.c index fdaa903cd61..709f8411eb6 100644 --- a/env/nand.c +++ b/env/nand.c @@ -275,7 +275,7 @@ int get_nand_env_oob(struct mtd_info *mtd, unsigned long *result) int ret; ops.datbuf = NULL; - ops.mode = MTD_OOB_AUTO; + ops.mode = MTD_OPS_AUTO_OOB; ops.ooboffs = 0; ops.ooblen = ENV_OFFSET_SIZE; ops.oobbuf = (void *)oob_buf; |