SAMA5D3 Xplained: SPL broken after panic added to /lib/time.c:94

Manuel Luís Reis mluis.reis at
Fri Apr 2 19:12:59 CEST 2021

> As it seems from the dump of dm_dump_all() the atmel_pit_timer is not
> probed. I did a bit of debug and the dm_timer_init() ->
> uclass_first_device() -> uclass_find_first_device() found zero timers
> registered for UCLASS_TIMER. The driver is compiled.  Also checked that
> atmel_pit_timer probe function is not called at all. The question should be
> why it is not probed at all?


So, I put objdump and puts to some good use and could backtrace the
initial error to a udelay call in ddr2_init function on mpddr.c file.
This function is called from mem_init on
sama5d3_xplained/sama5d3_xplained.c, which in turn is called from
board_init_f on spl_atmel.c.
I couldn't, however, find which timer_init function is being called
here. I still have a few to try, but disassembly gives me a pretty
empty function:

00303690 <timer_init>:
  303690:       e3a00000        mov     r0, #0
  303694:       e12fff1e        bx      lr

This work didn't give me many answers, but I got a couple of newbie questions:

Why is it calling board_init_f from spl_atmel.c and not spl_at91.c?
Isn't the latter the appropriate architecture for this board?
Do you know which timer_init function it is getting here?  Could this
be the reason timer isn't getting probed?


More information about the U-Boot mailing list