
Hi, I'm trying to port u-boot-1.1.2 to mpc852t on ep852 board (from embedded planet). I'm using RPXClassic as reference. I only changed the config file rest all is RPXClassic stuff.I've put the config file in the end of the post. First of all the console works only on 2400 even if i set baud rate to 9600 in my config.h . If i use any other baud rate i get junk on the screen. The board gives a "decrementer exception" in interrupt_init() in set_msr() in lib_ppc/interrupts.c which takes the code to timer_interrupt() and then to timer_interrupt_cpu(). I get all the messages till "Hit any key to stop autoboot: 5 " at this point it just hangs. When run through debugger (code warrior) , I accept the message (decrementer exception) and continue the execution and all works fine(I get the prompt).
The following is the dump ( i sprinkled the code with *many* printfs) ------------------------------------------------------------------------------------------------------------------------------------------------------------- U-Boot 1.1.2 (Oct 19 2005 - 18:40:16)
CPU: MPC852TxxZPnn at 50 MHz [40.0...50.0 MHz] 4 kB I-Cache 4 kB D-Cache FEC present Board: EP852 DRAM: 16 MB
cpu_clk= 50000000 bus_clk = 50000000 FLASH: Flash addr:ff800000 Device ID :227e227e 16 MB *** Warning - bad CRC, using default environment
Displaying devices : In: serial Out: serial Err: serial
console_init_r done decrementer_count = 3125 in hex 0xc35 entering cpm_interrupt_init entering irq_install_handler with CPMVEC_ERROR irq_install_handler done entering irq_install_handler with INTERRUPT irq_install_handler done cpm_interrupt_init done entering set_dec set_dec done entering set_msr *** Timer Interrupt *** // timer_interrupt_cpu() in cpu/mpc8xx/interrupts immr->im_clkrst.car_plprcr = 39a5000 immr->im_clkrst.car_plprcr = 39a0000 get_dec() = 4294514023l 0xfff91567 Inside timer_interrupt. decrementer_count = 3125 in hex 0xc35 interrupt init passed. setting timer entering initialization from env initialization from env done. entering bootfile stuff bootfile stuff done
Net: FEC ETHERNET
Entering main_loop### main_loop entered: bootdelay=5
### main_loop: bootcmd="tftpboot; setenv bootargs root=/dev/nfs rw nfsroot=$(ser verip):$(rootpath) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname): :off; bootm" Hit any key to stop autoboot: 5 -------------------------------------------------------------------------------------------------------------------------------------------------- Why is immr->im_clkrst.car_plprcr = 39a5000 when in config.h i define PLPRCR as 0x000A4000 ? Does it matter?
Some of the defines in config.h #define RPXClassic_50MHz#define CONFIG_MPC860 1 #define CONFIG_RPXCLASSIC 1 #define CONFIG_MPC852T 1
#define CONFIG_8xx_OSCLK 10000000 #define CONFIG_8xx_CPUCLK_DEFAULT 50000000 // 50 MHz #define CFG_8xx_CPUCLK_MIN 40000000 // 40 MHz #define CFG_8xx_CPUCLK_MAX 50000000
#define CFG_LOAD_ADDR CFG_SDRAM_BASE #define CFG_IMMR 0xFA200000 #define CFG_SDRAM_BASE 0x00000000 #define CFG_FLASH_BASE 0xFF800000 #define CFG_MONITOR_BASE CFG_FLASH_BASE
#define CFG_SYPCR 0xFFFFFF89 #define CFG_SIUMCR 0x01000800 #define CFG_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTE) #define CFG_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE) #define CFG_PLPRCR 0x000A4000 // is this OK??
#define CFG_SCCR 0x03020800 #define CFG_DER 0x73E67C0F #define CFG_OR1_PRELIM 0xFF000600 #define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
#define CFG_MAMR_PTA 58 #define CFG_MPTPR MPTPR_PTP_DIV2 #define CFG_MAMR_10COL 0x58803000
All the hard coded values are from the configuration file I got along with the board to be used with code warrior and the board works fine with that, so they are right.
Thanks in advance.