i had some problem in uboot1.1.1
i was a freshman in developing sbc8260 board.
i got a led_light program for testing boot ,and set some register right incpu_init_f. Why the uboot could not boot successed?
another questions:what purpose about env_init?
Thanks!
static int led_light(void)
{
int i,j;
char *k=0x21000000;
char ki[8]={0,4,2,6,1,5,3,7};
int l=0;
for(i=0;i<=7;i++)
{
for(j=1;j<100;j++)
{
l++;
}
*(k+ki[i])=0x80;
for(j=1;j<5000000;j++)
{
l--;
}
*(k+ki[i])=0x0;
return(0);
}
}
nit_fnc_t *init_sequence[] = {
#if defined(CONFIG_BOARD_EARLY_INIT_F)board_early_init_f,
#endif
#if !defined(CONFIG_TQM866M)get_clocks, /* get CPU and bus clocks (etc.) */ #if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) adjust_sdram_tbs_8xx,
#endifinit_timebase,
#endif
#ifdef CFG_ALLOC_DPRAM
#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560)) dpram_init,
#endif
#endif
#if defined(CONFIG_BOARD_POSTCLK_INIT) board_postclk_init,
#endif
led_light, //if i placed this program here, the led of board flashed.
env_init,
led_light, //if i placed this program here, the led of board didn't flash
#if defined(CONFIG_TQM866M)get_clocks_866, /* get CPU and bus clocks according to the environment variable */sdram_adjust_866, /* adjust sdram refresh rate according to the new clock */ init_timebase,
#endifinit_baudrate,serial_init,console_init_f,display_options,
#if defined(CONFIG_8260)prt_8260_rsr,prt_8260_clks,
#endif /* CONFIG_8260 */
checkcpu,
#if defined(CONFIG_MPC5xxx)prt_mpc5xxx_clks,
#endif /* CONFIG_MPC5xxx */
checkboard,INIT_FUNC_WATCHDOG_INIT
#if defined(CONFIG_MISC_INIT_F)misc_init_f,
#endifINIT_FUNC_WATCHDOG_RESET
#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) init_func_i2c,
#endif
#if defined(CONFIG_DTT) /* Digital Thermometers and Thermostats */ dtt_init,
#endif
#ifdef CONFIG_POSTpost_init_f,
#endifINIT_FUNC_WATCHDOG_RESETinit_func_ram,
#if defined(CFG_DRAM_TEST)
testdram,
#endif /* CFG_DRAM_TEST */INIT_FUNC_WATCHDOG_RESET
NULL, /* Terminate this list */
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20051101/5f2e1303/attachment.htm
Quoted 10 lines · In message <[email protected]> you wrote:
i was a freshman in developing sbc8260 board.
i got aled_lightprogram for testing boot ,and set some register right incpu_init_f. Why the uboot could not boot successed?
another questions:what purpose aboutenv_init?
Thanks!
static intled_light(void)
{
int i,j;
char *k=0x21000000;
What do you think is at physical address 0x21000000 ?
And why do you think the compiler will not optimize away your delay loops?
And why do you post code which is corrupted and unreadable?
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you want strict real-time behavior, run in the real time schedu-
ling class. But there are no seatbelts or airbags; main(){for(;;);}
can hard hang your system. -- Bart Smaalders