diff options
| author | Marek Vasut <[email protected]> | 2025-06-09 21:26:37 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-06-20 12:15:08 -0600 |
| commit | 5fb88fa725d6d4f6d358e86613a14cde01426692 (patch) | |
| tree | 8bab2c1b25162a7dae1ff385cd072bb1fd2d98c6 /env | |
| parent | 0fd9a3480a024a39da00b502af1406418378a27e (diff) | |
env: Rename SYS_REDUNDAND_ENVIRONMENT to ENV_REDUNDANT
Rename the variable and add ENV_ prefix, so that all configuration
options which are related to environment would have an CONFIG_ENV_
prefix. No functional change.
Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'env')
| -rw-r--r-- | env/Kconfig | 10 | ||||
| -rw-r--r-- | env/common.c | 6 | ||||
| -rw-r--r-- | env/fat.c | 8 | ||||
| -rw-r--r-- | env/mmc.c | 14 | ||||
| -rw-r--r-- | env/sf.c | 6 | ||||
| -rw-r--r-- | env/ubi.c | 16 |
6 files changed, 30 insertions, 30 deletions
diff --git a/env/Kconfig b/env/Kconfig index ee47b565213..414db543b82 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -489,7 +489,7 @@ config ENV_IS_IN_UBI the environment in. This will enable redundant environments in UBI. It is assumed that both volumes are in the same MTD partition. -config SYS_REDUNDAND_ENVIRONMENT +config ENV_REDUNDANT bool "Enable redundant environment support" help Normally, the environemt is stored in a single location. By @@ -543,7 +543,7 @@ config ENV_FAT_FILE config ENV_FAT_FILE_REDUND string "Name of the FAT file to use for the environment" - depends on ENV_IS_IN_FAT && SYS_REDUNDAND_ENVIRONMENT + depends on ENV_IS_IN_FAT && ENV_REDUNDANT default "uboot-redund.env" help It's a string of the FAT file name. This file use to store the @@ -595,7 +595,7 @@ config ENV_ADDR config ENV_ADDR_REDUND hex "Redundant environment address" - depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT + depends on ENV_IS_IN_FLASH && ENV_REDUNDANT help Offset from the start of the device (or partition) of the redundant environment location. @@ -625,7 +625,7 @@ config ENV_OFFSET config ENV_OFFSET_REDUND hex "Redundant environment offset" depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \ - ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT + ENV_IS_IN_SPI_FLASH) && ENV_REDUNDANT default 0x10C0000 if MICROBLAZE default 0x0 help @@ -675,7 +675,7 @@ config ENV_UBI_VOLUME config ENV_UBI_VOLUME_REDUND string "UBI redundant volume name" - depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT + depends on ENV_IS_IN_UBI && ENV_REDUNDANT help Name of the redundant volume that you want to store the environment in. diff --git a/env/common.c b/env/common.c index 86122582bc1..1e23c5de436 100644 --- a/env/common.c +++ b/env/common.c @@ -466,7 +466,7 @@ int env_import(const char *buf, int check, int flags) return -EIO; } -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT static unsigned char env_flags; int env_check_redund(const char *buf1, int buf1_read_fail, @@ -543,7 +543,7 @@ int env_import_redund(const char *buf1, int buf1_read_fail, return env_import((char *)ep, 0, flags); } -#endif /* CONFIG_SYS_REDUNDAND_ENVIRONMENT */ +#endif /* CONFIG_ENV_REDUNDANT */ /* Export the environment and generate CRC for it. */ int env_export(env_t *env_out) @@ -560,7 +560,7 @@ int env_export(env_t *env_out) env_out->crc = crc32(0, env_out->data, ENV_SIZE); -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT env_out->flags = ++env_flags; /* increase the serial */ #endif diff --git a/env/fat.c b/env/fat.c index 1ad301eaaff..65ee1c8e086 100644 --- a/env/fat.c +++ b/env/fat.c @@ -86,7 +86,7 @@ static int env_fat_save(void) return 1; } -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT if (gd->env_valid == ENV_VALID) file = CONFIG_ENV_FAT_FILE_REDUND; #endif @@ -101,7 +101,7 @@ static int env_fat_save(void) return 1; } -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT gd->env_valid = (gd->env_valid == ENV_REDUND) ? ENV_VALID : ENV_REDUND; #endif @@ -112,7 +112,7 @@ static int env_fat_save(void) static int env_fat_load(void) { ALLOC_CACHE_ALIGN_BUFFER(char, buf1, CONFIG_ENV_SIZE); -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT ALLOC_CACHE_ALIGN_BUFFER(char, buf2, CONFIG_ENV_SIZE); int err2; #endif @@ -153,7 +153,7 @@ static int env_fat_load(void) } err1 = file_fat_read(CONFIG_ENV_FAT_FILE, buf1, CONFIG_ENV_SIZE); -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT err2 = file_fat_read(CONFIG_ENV_FAT_FILE_REDUND, buf2, CONFIG_ENV_SIZE); err1 = (err1 >= 0) ? 0 : -1; diff --git a/env/mmc.c b/env/mmc.c index 8848371eb4f..5451f914027 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -186,7 +186,7 @@ static inline s64 mmc_offset(struct mmc *mmc, int copy) defvalue = ENV_MMC_OFFSET; propname = dt_prop.offset; - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT) && copy) { + if (IS_ENABLED(CONFIG_ENV_REDUNDANT) && copy) { defvalue = ENV_MMC_OFFSET_REDUND; propname = dt_prop.offset_redund; } @@ -198,7 +198,7 @@ static inline s64 mmc_offset(struct mmc *mmc, int copy) { s64 offset = ENV_MMC_OFFSET; - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT) && copy) + if (IS_ENABLED(CONFIG_ENV_REDUNDANT) && copy) offset = ENV_MMC_OFFSET_REDUND; return offset; @@ -213,7 +213,7 @@ static bool mmc_env_is_redundant_in_both_boot_hwparts(struct mmc *mmc) * identical, store the environment and redundant environment in both * eMMC boot partitions, one copy in each. */ - if (!IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) + if (!IS_ENABLED(CONFIG_ENV_REDUNDANT)) return false; if (CONFIG_SYS_MMC_ENV_PART != 1) @@ -337,7 +337,7 @@ static int env_mmc_save(void) if (ret) goto fini; - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) { + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) { if (gd->env_valid == ENV_VALID) copy = 1; @@ -362,7 +362,7 @@ static int env_mmc_save(void) ret = 0; - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) gd->env_valid = gd->env_valid == ENV_REDUND ? ENV_VALID : ENV_REDUND; fini: @@ -411,7 +411,7 @@ static int env_mmc_erase(void) printf("\n"); ret = erase_env(mmc, CONFIG_ENV_SIZE, offset); - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) { + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) { copy = 1; if (mmc_env_is_redundant_in_both_boot_hwparts(mmc)) { @@ -555,7 +555,7 @@ static int env_mmc_load(void) { if (IS_ENABLED(ENV_IS_EMBEDDED)) return 0; - else if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) + else if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) return env_mmc_load_redundant(); else return env_mmc_load_singular(); @@ -380,7 +380,7 @@ static int env_sf_init_early(void) tmp_env1 = (env_t *)memalign(ARCH_DMA_MINALIGN, CONFIG_ENV_SIZE); - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) tmp_env2 = (env_t *)memalign(ARCH_DMA_MINALIGN, CONFIG_ENV_SIZE); @@ -394,7 +394,7 @@ static int env_sf_init_early(void) read1_fail = spi_flash_read(env_flash, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, tmp_env1); - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) { + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) { read2_fail = spi_flash_read(env_flash, CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE, tmp_env2); @@ -429,7 +429,7 @@ err_read: spi_flash_free(env_flash); free(tmp_env1); - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) free(tmp_env2); out: /* env is not valid. always return 0 */ diff --git a/env/ubi.c b/env/ubi.c index 2f4ca571edb..f424b1a16e8 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -27,14 +27,14 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_SYS_REDUNDAND_ENVIRONMENT +#if CONFIG_ENV_REDUNDANT #define ENV_UBI_VOLUME_REDUND CONFIG_ENV_UBI_VOLUME_REDUND #else #define ENV_UBI_VOLUME_REDUND "invalid" #endif #ifdef CONFIG_CMD_SAVEENV -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT static int env_ubi_save(void) { ALLOC_CACHE_ALIGN_BUFFER(env_t, env_new, 1); @@ -76,7 +76,7 @@ static int env_ubi_save(void) return 0; } -#else /* ! CONFIG_SYS_REDUNDAND_ENVIRONMENT */ +#else /* ! CONFIG_ENV_REDUNDANT */ static int env_ubi_save(void) { ALLOC_CACHE_ALIGN_BUFFER(env_t, env_new, 1); @@ -102,10 +102,10 @@ static int env_ubi_save(void) puts("done\n"); return 0; } -#endif /* CONFIG_SYS_REDUNDAND_ENVIRONMENT */ +#endif /* CONFIG_ENV_REDUNDANT */ #endif /* CONFIG_CMD_SAVEENV */ -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT +#ifdef CONFIG_ENV_REDUNDANT static int env_ubi_load(void) { ALLOC_CACHE_ALIGN_BUFFER(char, env1_buf, CONFIG_ENV_SIZE); @@ -149,7 +149,7 @@ static int env_ubi_load(void) return env_import_redund((char *)tmp_env1, read1_fail, (char *)tmp_env2, read2_fail, H_EXTERNAL); } -#else /* ! CONFIG_SYS_REDUNDAND_ENVIRONMENT */ +#else /* ! CONFIG_ENV_REDUNDANT */ static int env_ubi_load(void) { ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE); @@ -180,7 +180,7 @@ static int env_ubi_load(void) return env_import(buf, 1, H_EXTERNAL); } -#endif /* CONFIG_SYS_REDUNDAND_ENVIRONMENT */ +#endif /* CONFIG_ENV_REDUNDANT */ static int env_ubi_erase(void) { @@ -202,7 +202,7 @@ static int env_ubi_erase(void) CONFIG_ENV_UBI_VOLUME); ret = 1; } - if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) { + if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) { if (ubi_volume_write(ENV_UBI_VOLUME_REDUND, (void *)env_buf, 0, CONFIG_ENV_SIZE)) { printf("\n** Unable to erase env to %s:%s **\n", |
