This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: hal_platform_setup.h - Approach to a new platform port
- From: Ilija Koco <ilijak at siva dot com dot mk>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: ecos-devel at ecos dot sourceware dot org
- Date: Tue, 06 Jun 2006 15:01:42 +0200
- Subject: Re: hal_platform_setup.h - Approach to a new platform port
- References: <44852E58.4080200@siva.com.mk> <20060606120227.GF15066@lunn.ch>
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