<div>i was a freshman in developing sbc8260 board.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>i got a led_light program for testing boot ,and set some register right in cpu_init_f. Why the uboot&nbsp;could not boot successed?</div>
<div>another questions:what purpose about env_init?</div>
<div>&nbsp;</div>
<div>Thanks!</div>
<div>&nbsp;</div>
<div><font size="4">static int led_light(void)</font></div>
<div><font size="4">&nbsp;{<br>&nbsp;int i,j;<br>&nbsp;char *k=0x21000000;<br>&nbsp;char ki[8]={0,4,2,6,1,5,3,7};<br>&nbsp;int l=0;<br>&nbsp;for(i=0;i&lt;=7;i++)<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;for(j=1;j&lt;100;j++)<br>&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;l++;<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;*(k+ki[i])=0x80;<br>&nbsp;&nbsp;for(j=1;j&lt;5000000;j++) 
<br>&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;l--;<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;*(k+ki[i])=0x0;<br>&nbsp;&nbsp;return(0);</font></div>
<div><font size="4">&nbsp;&nbsp; }<br>&nbsp;}<br>&nbsp;</font></div>
<div>&nbsp;</div>
<div>
<p>nit_fnc_t *init_sequence[] = {</p>
<p>#if defined(CONFIG_BOARD_EARLY_INIT_F)<br>&nbsp;board_early_init_f,<br>#endif</p>
<p>#if !defined(CONFIG_TQM866M)<br>&nbsp;get_clocks,&nbsp;&nbsp;/* get CPU and bus clocks (etc.) */<br>#if defined(CONFIG_TQM8xxL) &amp;&amp; !defined(CONFIG_TQM866M)<br>&nbsp;adjust_sdram_tbs_8xx,<br>#endif<br>&nbsp;init_timebase,<br>#endif<br>
#ifdef CFG_ALLOC_DPRAM<br>#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560))<br>&nbsp;dpram_init,<br>#endif<br>#endif<br>#if defined(CONFIG_BOARD_POSTCLK_INIT)<br>&nbsp;board_postclk_init,<br>#endif</p>
<p><font size="4">led_light,&nbsp;&nbsp;//if i placed this program here, the led of board&nbsp;flashed.&nbsp;</font></p>
<p><br>&nbsp;env_init,</p>
<p>&nbsp;</p>
<p><font size="4">led_light,&nbsp; //if i placed this program here, the led of board didn't flash</font></p>
<p>&nbsp;</p>
<p><br>#if defined(CONFIG_TQM866M)<br>&nbsp;get_clocks_866,&nbsp;&nbsp;/* get CPU and bus clocks according to the environment variable */<br>&nbsp;sdram_adjust_866,&nbsp;/* adjust sdram refresh rate according to the new clock */<br>&nbsp;init_timebase, 
<br>#endif<br>&nbsp;init_baudrate,<br>&nbsp;serial_init,<br>&nbsp;console_init_f,<br>&nbsp;display_options,<br>#if defined(CONFIG_8260)<br>&nbsp;prt_8260_rsr,<br>&nbsp;prt_8260_clks,<br>#endif /* CONFIG_8260 */<br>&nbsp;checkcpu,<br>#if defined(CONFIG_MPC5xxx)
<span></span> <br>&nbsp;prt_mpc5xxx_clks,<br>#endif /* CONFIG_MPC5xxx */<br>&nbsp;checkboard,<br>&nbsp;INIT_FUNC_WATCHDOG_INIT<br>#if defined(CONFIG_MISC_INIT_F)<br>&nbsp;misc_init_f,<br>#endif<br>&nbsp;INIT_FUNC_WATCHDOG_RESET<br>#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) 
<br>&nbsp;init_func_i2c,<br>#endif<br>#if defined(CONFIG_DTT)&nbsp;&nbsp;/* Digital Thermometers and Thermostats */<br>&nbsp;dtt_init,<br>#endif<br>#ifdef CONFIG_POST<br>&nbsp;post_init_f,<br>#endif<br>&nbsp;INIT_FUNC_WATCHDOG_RESET<br>&nbsp;init_func_ram, 
<br>#if defined(CFG_DRAM_TEST)<br>&nbsp;testdram,<br>#endif /* CFG_DRAM_TEST */<br>&nbsp;INIT_FUNC_WATCHDOG_RESET</p>
<p>&nbsp;NULL,&nbsp;&nbsp;&nbsp;/* Terminate this list */<br>};</p></div><br style="FONT-SIZE: 8px" clear="all">