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

Wolfgang Denk
2010-10-01T10:55:06Z

Dear Reinhard Meyer,

In message <4CA5BB7A.8050304@emk-elektronik.de> you wrote:
>
> > 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.

...which is, and always has been, illegal.

> 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)

Not bd-> but gd-> which was made for exactly that purpose.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
EMACS belongs in <sys/errno.h>: Editor too big!