summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu J. Poirier <mathieu.poirier@linaro.org>2011-05-30 16:43:25 -0600
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2011-05-30 16:47:59 -0600
commit9ab1032e6771f3ba92e85b9eb94f2f35a94943cc (patch)
treea7c68c69b63639f5ba9507ea42b1883874d3296e
parent6b4e4eec91267e7f2841dc0d95c9b8c08cfb628b (diff)
downloadu-boot-lt-ux500-9ab1032e6771f3ba92e85b9eb94f2f35a94943cc.tar.gz
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 76adcb8..da09eb9 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;