From: =?GB2312?B?wfW74czv?= Date: Tue, 1 Nov 2005 22:27:02 +0800 Subject: [U-Boot-Users] i had some problem in uboot1.1.1 Message-ID: <8ff569fd0511010627x1a82d946k@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de i was a freshman in developing sbc8260 board. i got a led_light program for testing boot ,and set some register right in cpu_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, #endif init_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, #endif init_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, #endif INIT_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_POST post_init_f, #endif INIT_FUNC_WATCHDOG_RESET init_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