3 * Graeme Russ, <graeme.russ@gmail.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <environment.h>
31 #include <asm/init_wrappers.h>
33 int serial_initialize_r(void)
41 * Tell if it's OK to load the environment early in boot.
43 * If CONFIG_OF_CONFIG is defined, we'll check with the FDT to see
44 * if this is OK (defaulting to saying it's not OK).
46 * NOTE: Loading the environment early can be a bad idea if security is
47 * important, since no verification is done on the environment.
49 * @return 0 if environment should not be loaded, !=0 if it is ok to load
51 static int should_load_env(void)
53 #ifdef CONFIG_OF_CONTROL
54 return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0);
55 #elif defined CONFIG_DELAY_ENVIRONMENT
62 int env_relocate_r(void)
64 /* initialize environment */
65 if (should_load_env())
68 set_default_env(NULL);
76 /* Do pci configuration */
82 int jumptable_init_r(void)
89 int pcmcia_init_r(void)
105 int enable_interrupts_r(void)
107 /* enable exceptions */
113 int eth_initialize_r(void)
116 eth_initialize(gd->bd);
121 int reset_phy_r(void)
124 puts("Reset Ethernet PHY\n");
139 int scsi_init_r(void)
147 #ifdef CONFIG_BITBANGMII
148 int bb_miiphy_init_r(void)
159 post_run(NULL, POST_RAM | post_bootmode_get(0));