[U-Boot] [RFC PATCH] arm, davinci: Remove board specific code from da850_lowlevel.c

Wolfgang Denk wd at denx.de
Wed Nov 9 07:47:07 CET 2011


Dear Heiko Schocher,

In message <4EBA11A9.6060905 at denx.de> you wrote:
>
> > On my board I cannot use your code in arch_cpu_init() in da850_lowlevel.c
> > since I have different versions of my board with different input
> > clock frequencies. Here u-boot should first determine the board
> > revision number and then configure the SoC accordingly. Therefore I would 
> > like to move all board-specific parts (and PLL and memory configuration is 
> > board-specific since it depends on the memory chips and oscillators 
> > deployed on the board) to board_early_init_f which is called right after 
> > arch_cpu_init() and keep only a few initializiation steps in arch_cpu_init().
> 
> Ok, if you have other needs on your board we must change something.
> But I want to prevent, that all the code you remove in your patch is
> moved to board code, so all boards must (copy?) it. Instead you should
> move it to a weak function, which you can replace for your specific
> needs. (I thought the code was common enough ...)

I guess in most cases no different code will be needed, but just
different configuration parameters.  It should be possible to handle
these through settings in the board config header file.

In any case, a duplication of that coede shall be avoided.

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
The following statement is not true.  The previous statement is true.


More information about the U-Boot mailing list