2 * (C) Copyright 2011-2012 Freescale Semiconductor, Inc.
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 #include <environment.h>
28 #include <linux/stddef.h>
30 char *env_name_spec = "Remote";
32 #ifdef ENV_IS_EMBEDDED
33 env_t *env_ptr = &environment;
34 #else /* ! ENV_IS_EMBEDDED */
35 env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
36 #endif /* ENV_IS_EMBEDDED */
38 DECLARE_GLOBAL_DATA_PTR;
40 #if !defined(CONFIG_ENV_OFFSET)
41 #define CONFIG_ENV_OFFSET 0
46 if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
47 gd->env_addr = (ulong)&(env_ptr->data);
52 gd->env_addr = (ulong)default_environment;
57 #ifdef CONFIG_CMD_SAVEENV
60 #ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
61 printf("Can not support the 'saveenv' when boot from SRIO or PCIE!\n");
67 #endif /* CONFIG_CMD_SAVEENV */
69 void env_relocate_spec(void)
71 #ifndef ENV_IS_EMBEDDED
72 env_import((char *)env_ptr, 1);