summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu J. Poirier <mathieu.poirier@linaro.org>2011-05-30 16:43:25 -0600
committerMats Bergstrom <mats.m.bergstrom@stericsson.com>2011-10-06 12:46:34 +0200
commit0701352c0467e66034092645c32d02a394b03399 (patch)
tree67d8438e72520fce8db06fbb59d2f5cc38d885a0
parent5d12da656c5a27d5a27aaabc1e9cb822d9a434c6 (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.c17
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;