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>
32 #include <asm/init_wrappers.h>
34 int serial_initialize_r(void)
42 * Tell if it's OK to load the environment early in boot.
44 * If CONFIG_OF_CONFIG is defined, we'll check with the FDT to see
45 * if this is OK (defaulting to saying it's not OK).
47 * NOTE: Loading the environment early can be a bad idea if security is
48 * important, since no verification is done on the environment.
50 * @return 0 if environment should not be loaded, !=0 if it is ok to load
52 static int should_load_env(void)
54 #ifdef CONFIG_OF_CONTROL
55 return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0);
56 #elif defined CONFIG_DELAY_ENVIRONMENT
63 int env_relocate_r(void)
65 /* initialize environment */
66 if (should_load_env())
69 set_default_env(NULL);
77 /* Do pci configuration */
83 int jumptable_init_r(void)
90 int pcmcia_init_r(void)
106 int enable_interrupts_r(void)
108 /* enable exceptions */
114 int eth_initialize_r(void)
117 eth_initialize(gd->bd);
122 int reset_phy_r(void)
125 puts("Reset Ethernet PHY\n");
140 int scsi_init_r(void)
148 #ifdef CONFIG_BITBANGMII
149 int bb_miiphy_init_r(void)
160 post_run(NULL, POST_RAM | post_bootmode_get(0));