[U-Boot] u-boot on mcf5307

Angelo Dureghello angelo70 at gmail.com
Fri Jul 29 00:08:09 CEST 2011


Dear all,

i succesfully added support for mcf5307, was quite easy, as you suggested i started from a m68k/cpu model with a very similar memory map.

I am trying now to have the bootloader running in a custom board i developed:
MCF5307
SDRAM 16M, mapped at 0x00000000
FLASH  4M, mapped at 0xffc00000

The bootloader works great only if i don't enable timer2 for the clock/timestamp.
If timer2 is enabled i get the following error:


U-Boot 2011.06-rc2-dirty (Jul 28 2011 - 23:55:16)

CPU:   Freescale Coldfire MCF5307 at 90 MHz
Board: AMCORE v.001(alpha)
DRAM:  16 MiB
SDRAM test:
testing MB 01 ...
testing MB 02 ...
testing MB 03 ...
testing MB 04 ...
testing MB 05 ...
testing MB 06 ...
testing MB 07 ...
testing MB 08 ...
testing MB 09 ...
testing MB 10 ...
testing MB 11 ...
testing MB 12 ...
testing MB 13 ...
testing MB 14 ...
testing MB 15 ...
testing MB 16 ...
test passed !
Flash: 4 MiB

amcore$

*** Unexpected exception ***
Vector Number: 3  Format: 04  Fault Status: 4

PC: 00fe910a    SR: 00002000    SP: 00ed8af0
D0: 00002c1b    D1: 0000001b    D2: 00400000    D3: 00ee8b76
D4: ffc12d08    D5: ffffffff    D6: 00ffad57    D7: 00ee8b76
A0: 00ee8b76    A1: 00fe9604    A2: 00ee8bc6    A3: 00ffd400
A4: 00ff8167    A5: 00ffbb00    A6: 00ed8b48

*** Please Reset Board! ***


Debugging seems that the issue is returning from the timer interrupt handler, exactly here:


#define RESTORE_ALL						\
	moveml	%sp@,%d0-%d7/%a0-%a6;				\
	addl	#60,%sp;		/* space for 15 regs */ \
	rte  <<< ---- HERE , returning

_int_handler:
	SAVE_ALL
	movel	%sp,%sp at -
	bsr int_handler
	addql	#4,%sp
	RESTORE_ALL


The issue is very strange, everything works well, relocation to ram included, i test the SDRAM with cache disabled (then re-enabled), so there must be no issues on the memory. Calls and returning from C functions called in board_init_r also works fine, exception happen only returning from the interrupt.

I am working on the issue, but every help is really appreciated.

Regards,
angelo dureghello




More information about the U-Boot mailing list