aboutsummaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
Diffstat (limited to 'env')
-rw-r--r--env/Kconfig34
-rw-r--r--env/ext4.c5
-rw-r--r--env/fat.c8
-rw-r--r--env/nand.c8
4 files changed, 38 insertions, 17 deletions
diff --git a/env/Kconfig b/env/Kconfig
index 2f625b2257..238e4c70cf 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -30,6 +30,22 @@ config ENV_OVERWRITE
Use this to permit overriding of certain environmental variables
like Ethernet and Serial
+config ENV_MIN_ENTRIES
+ int "Minimum number of entries in the environment hashtable"
+ default 64
+ help
+ Minimum number of entries in the hash table that is used internally
+ to store the environment settings.
+
+config ENV_MAX_ENTRIES
+ int "Maximumm number of entries in the environment hashtable"
+ default 512
+ help
+ Maximum number of entries in the hash table that is used internally
+ to store the environment settings. The default setting is supposed to
+ be generous and should work in most cases. This setting can be used
+ to tune behaviour; see lib/hashtable.c for details.
+
config ENV_IS_NOWHERE
bool "Environment is not stored"
default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
@@ -248,14 +264,6 @@ config ENV_IS_IN_NAND
during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
aligned to an erase block boundary.
- - CONFIG_ENV_RANGE (optional):
-
- Specifies the length of the region in which the environment
- can be written. This should be a multiple of the NAND device's
- block size. Specifying a range with more erase blocks than
- are needed to hold CONFIG_ENV_SIZE allows bad blocks within
- the range to be avoided.
-
- CONFIG_ENV_OFFSET_OOB (optional):
Enables support for dynamically retrieving the offset of the
@@ -264,6 +272,16 @@ config ENV_IS_IN_NAND
Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
using CONFIG_ENV_OFFSET_OOB.
+config ENV_RANGE
+ hex "Length of the region in which the environment can be written"
+ depends on ENV_IS_IN_NAND
+ range ENV_SIZE 0x7fffffff
+ default ENV_SIZE
+ help
+ This should be a multiple of the NAND device's block size.
+ Specifying a range with more erase blocks than are needed to hold
+ CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
+
config ENV_IS_IN_NVRAM
bool "Environment in a non-volatile RAM"
depends on !CHAIN_OF_TRUST
diff --git a/env/ext4.c b/env/ext4.c
index 9f65afb8a4..47e05a4891 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -31,6 +31,7 @@
#include <errno.h>
#include <ext4fs.h>
#include <mmc.h>
+#include <scsi.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -146,6 +147,10 @@ static int env_ext4_load(void)
if (!strcmp(ifname, "mmc"))
mmc_initialize(NULL);
#endif
+#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
+ if (!strcmp(ifname, "scsi"))
+ scsi_scan(true);
+#endif
part = blk_get_device_part_str(ifname, dev_and_part,
&dev_desc, &info, 1);
diff --git a/env/fat.c b/env/fat.c
index 6251d9649b..3172130d75 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <fat.h>
#include <mmc.h>
+#include <scsi.h>
#include <asm/cache.h>
#include <asm/global_data.h>
#include <linux/stddef.h>
@@ -128,7 +129,12 @@ static int env_fat_load(void)
if (!strcmp(ifname, "mmc"))
mmc_initialize(NULL);
#endif
-
+#ifndef CONFIG_SPL_BUILD
+#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
+ if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi"))
+ scsi_scan(true);
+#endif
+#endif
part = blk_get_device_part_str(ifname, dev_and_part,
&dev_desc, &info, 1);
if (part < 0)
diff --git a/env/nand.c b/env/nand.c
index 21aa367d5b..df300b1317 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -33,10 +33,6 @@
#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND
#endif
-#ifndef CONFIG_ENV_RANGE
-#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE
-#endif
-
#if defined(ENV_IS_EMBEDDED)
static env_t *env_ptr = &environment;
#elif defined(CONFIG_NAND_ENV_DST)
@@ -201,10 +197,6 @@ static int env_nand_save(void)
#endif
};
-
- if (CONFIG_ENV_RANGE < CONFIG_ENV_SIZE)
- return 1;
-
ret = env_export(env_new);
if (ret)
return ret;