2 * (C) Copyright 2011-2012 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <environment.h>
12 #include <linux/stddef.h>
14 char *env_name_spec = "Remote";
16 #ifdef ENV_IS_EMBEDDED
17 env_t *env_ptr = &environment;
18 #else /* ! ENV_IS_EMBEDDED */
19 env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
20 #endif /* ENV_IS_EMBEDDED */
22 DECLARE_GLOBAL_DATA_PTR;
24 #if !defined(CONFIG_ENV_OFFSET)
25 #define CONFIG_ENV_OFFSET 0
30 if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
31 gd->env_addr = (ulong)&(env_ptr->data);
36 gd->env_addr = (ulong)default_environment;
41 #ifdef CONFIG_CMD_SAVEENV
44 #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
45 printf("Can not support the 'saveenv' when boot from SRIO or PCIE!\n");
51 #endif /* CONFIG_CMD_SAVEENV */
53 void env_relocate_spec(void)
55 #ifndef ENV_IS_EMBEDDED
56 env_import((char *)env_ptr, 1);