MPC8248 goes berserk when printing messages on the SMC console

Laurent Pinchart laurent.pinchart at tbox.biz
Tue May 16 02:28:22 EST 2006


Hi everybody,

I'm trying to convince an MPC8248 board to boot Linux, and I'm having problems 
with the SMC console. I posted an e-mail on linuxppc-embedded regarding 
BDI2000 problems earlier today. The problem hasn't been solved, but I've been 
able to work around it by adding an infinite loop in the kernel code at the 
point where I want to break, halting the execution when the loop has been 
reached, and using gdb from there.

The SMC console works fine in U-Boot. 115200 8N1, no problem there.

When booting a Linux 2.6.16 kernel, the processor doesn't print anything on 
the console and seems to hang. Further analysis with a BDI2000 reveals the 
following.

- The CPU is stuck in cpm_uart_console_write, checking for

while ((bdp->cbd_sc & BD_SC_READY) != 0);

  At that point, most of the external and internal memory read as 0 (SDRAM, 
flash, ...). A few memory locations contain values different than 0, and I 
suspect those to come directly from the cache.

- If I break right before setting the BD_SC_READY flag and run using stepi, 
random characters are sent on the serial port. Measuring the baudrate using 
an oscilloscope confirms that it has been correctly configured. Only the data 
is wrong.

- If I remove the lines

bdp->cbd_sc |= BD_SC_READY;

  the kernel runs until it panics when mounting the root partition.

- If I disable the SMC transmitter (by not setting SMCMR_TEN in SMCMR), the 
kernel hangs when wrapping around to the first buffer descriptor, waiting for 
it to be ready, which of course never happens.

This seems to confirm that the CPM does something very armful to the CPU. I'm 
completely lost here, and would appreciate any help.

Best regards,

Laurent Pinchart



More information about the Linuxppc-embedded mailing list