Matthias Kaehlcke wrote:
> Hello Wolfgang,
> 
> El Tue, Dec 08, 2009 at 12:51:47AM +0100 Wolfgang Denk ha dit:
> 
>>>> U-Boot uses assembler only when ther eis no reasonable way to
>>>> implement the code in C, and I don't see any such justification here.
>>>> Please rewrite all this in C.
>>> i'm just starting to get my feet wet with low level initialization and
>>> supposed sdram setup is always done in assembler.
>> There is no reason for assembly. We almost always do this in C.
> 
> i am starting to look at this issue and it seems i need some more guidance:
> 
> before relocating U-Boot to RAM for ARM920T processors a jump to the
> label *lowlevel_init* is performed, where RAM timings are supposed to
> be set up. in the patch i sent these operations are performed in
> assembly and you asked me to rewrite them in C.
> 
> i'm relativly new to low-level setup, so i apologize if the following
> question sounds plain stupid to you: is C really available at this
> point? if my interpretation of the code in cpu/arm920t/start.S is
> correct, C code starts at start_armboot, after relocation of
> U-Boot. and after that point i'd think it's to late to change RAM
> timings as U-Boot is running from RAM.
> 
> could you please give some advice to clear my confusion and maybe
> provide a pointer to a board/cpu which handles low-level setup in
> the intended way?
> 
> thanks
> 

I would've thought that you need a working stack before you can run 
'C' code so you'd need the RAM timing set up before you could run
C code hence you'd need to set the RAM timings up in assembler. 
Between start-up and the point the RAM timing gets configured it's 
running with the default values of the RAM timing registers which
probably aren't ideal for the particular RAM chips on the board.

At the moment the RAM timings for a specific board are set in the 
board-specific lowlevel_init assembler code. Any change would 
affect all s3c24x0 boards as well as the new edb93xx board.

Kevin
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to