[U-Boot] ARM relocation, probably trivial mistake - back to original problem

Reinhard Meyer u-boot at emk-elektronik.de
Fri Oct 1 12:44:10 CEST 2010


Dear Heiko Schocher,

> Hmm.. mabe something with at91_clock_init()
>
> This is called in arch_cpu_init(), and
> at the end, clocks are stored in
>
> arch/arm/cpu/arm926ejs/at91/clock.c
>
> in "static unsigned long" vars ... as this code
> runs before relocation, this seems to me as it
> could be the reason for your problems ... but I
> can;t try it here ... can you check this?

Indeed, that is called before relocation, because
the clock frequencies are needed by almost all drivers,
including the timer.

I am unsure now how to fix this. I see two options:

1. calculate afresh every time a get_*_clk_rate() is
called - thus not needing static storage

2. store the values in bd->something (if it's permissible
to expand bd)

Reinhard


More information about the U-Boot mailing list