diff options
author | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2011-05-30 16:43:25 -0600 |
---|---|---|
committer | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2011-05-30 16:47:59 -0600 |
commit | 9ab1032e6771f3ba92e85b9eb94f2f35a94943cc (patch) | |
tree | a7c68c69b63639f5ba9507ea42b1883874d3296e | |
parent | 6b4e4eec91267e7f2841dc0d95c9b8c08cfb628b (diff) |
Allowing snowball to work without an environment block in emmc.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rw-r--r-- | common/env_emmc.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/common/env_emmc.c b/common/env_emmc.c index 76adcb831..da09eb98e 100644 --- a/common/env_emmc.c +++ b/common/env_emmc.c @@ -11,6 +11,7 @@ #include <environment.h> #include <part.h> #include <mmc.h> +#include <asm/arch/cpu.h> DECLARE_GLOBAL_DATA_PTR; @@ -63,8 +64,12 @@ int saveenv(void) } if (size != CONFIG_ENV_SIZE) { - printf("env size mismatch, so env not saved!\n"); - return 1; + if (u8500_is_snowball()) { + size = CONFIG_ENV_SIZE; + } else { + printf("env size mismatch, so env not saved!\n"); + return 1; + } } env_crc_update(); @@ -111,8 +116,12 @@ void env_relocate_spec (void) } if (size != CONFIG_ENV_SIZE) { - printf("env size mismatch, so setting default env!\n"); - goto err; + if (u8500_is_snowball()) { + size = CONFIG_ENV_SIZE; + } else { + printf("env size mismatch, so setting default env!\n"); + goto err; + } } blkcnt = (size + mmc_dev->read_bl_len - 1) / mmc_dev->read_bl_len; |