Andrew Lunn wrote:
On Tue, Jun 06, 2006 at 09:27:20AM +0200, Ilija Koco wrote:
i> Hi
I am preparing to add new platform port, so I consider placing common variant setup code in a common header hal_variant_setup.h

Since this is not a common practice i would like to hear your opinion. Advantage of such organization is avoiding multiple copies of the code that is going to be same for all platforms:

- PLL clock initialization (all parameters are set by cdl so no changes in code are needed) - Memory re-mapping (This may need additional code for system,s with external memory, but it can then be added in hal_platform_setup_h when needed.

Attached diff file wou'd give you a breif picture (current port only). Pliease give your comments so I could proceed on.

The principal seems O.K. to me.
I would call the file hal_var_setup.h since that is the normally used
abbreviation for varient, eg var_io.h, hal_var_ints.h.
Andrew
It wont be bad, but I derived from hal_platform_setup.h that has "platform" instead of "plf" (as usual). Also these files contain assembler rater than C source so maybe it's better if they are distinguished by their names as they are now.

With respect to this, If you agree, I would keep hal_variant_setup.h
Please comment!

Ilija


Reply via email to