summaryrefslogtreecommitdiff
path: root/common/env_sf.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/env_sf.c')
-rw-r--r--common/env_sf.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/common/env_sf.c b/common/env_sf.c
index 2f52e25..6575b6d 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -47,7 +47,6 @@ DECLARE_GLOBAL_DATA_PTR;
/* references to names in env_common.c */
extern uchar default_environment[];
-extern int default_environment_size;
char * env_name_spec = "SPI Flash";
env_t *env_ptr;
@@ -143,16 +142,7 @@ err_probe:
err_crc:
puts("*** Warning - bad CRC, using default environment\n\n");
- if (default_environment_size > CONFIG_ENV_SIZE) {
- gd->env_valid = 0;
- puts("*** Error - default environment is too large\n\n");
- return;
- }
-
- memset(env_ptr, 0, sizeof(env_t));
- memcpy(env_ptr->data, default_environment, default_environment_size);
- env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
- gd->env_valid = 1;
+ set_default_env();
}
int env_init(void)