public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jifl@eCosCentric.com>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Andrew Lunn <andrew@lunn.ch>,  ecos-devel@ecos.sourceware.org
Subject: Re: at91sam9263ek
Date: Tue, 25 Nov 2008 22:58:00 -0000	[thread overview]
Message-ID: <492C82BF.6090502@eCosCentric.com> (raw)
In-Reply-To: <20081125205031.GA14639@rain>

Evgeniy Dushistov wrote:
> On Tue, Nov 18, 2008 at 04:37:33PM +0000, Jonathan Larmour wrote:
> 
>>Andrew Lunn wrote:
>>
>>>On Thu, Nov 06, 2008 at 09:23:28PM +0300, Evgeniy Dushistov wrote:
>>>
>>>>Hi,  
>>>> 
>>>>I want to see working ecos on at91sam9263ek board.  
>>>>As far as I know, there is no freely available source code of ecos port on  
>>>>this hardware, am I right? (I know about ecoscentric, but it is not  
>>>>freely available).  
>>>> 
>>>>May be anybody is working on such kind of port?  
>>>> 
>>>>Right now I'm reading docs about cdl language, and stuck on which
>>>>variant to choose: create directory at91sam9 in  
>>>>packages/hal/arm/arm9 and write hal package from scratch  
>>>>or use packages/hal/arm/at91 stuff, at91sam9263ek is very similar  
>>>>to at91sam7s,
>>
>>I don't think it's that similar. At least, it seems similar at a
>>high-level, but differs in most of the details once you get into it. The
>>register layouts differ in many places between the SAM9 variants even. I
>>think you'd end up with huge amounts of ifdefs.
> 
> Can you, please, give, example of such defence?

Well I had flicked through our own SAM926x implementation to see the 
variations, and there was differences for most of the base addresses as 
you saw, the bus matrix, the EBI, pin mappings, peripheral assignments, 
USB and PLLs.

Just to be clear, I was talking about cloning, rather than really starting 
from scratch, but I'm sure that's what you were considering.

>>I recommend the former approach. If there is anything that can sensibly be
>>shared, perhaps it could be broken out into a separate package.
>>
> 
> you mean split hal on several packages?
> like package for work with gpio,
> for reset cpu and so on?

I meant have a common package for the bits which are indeed common.

The reason is that I think it would be bad for the AT91 HAL to be a big 
mess of #ifdefs for all the different variants all the way through. It's 
getting that way already. eCos is meant to be modular, rather than having 
large monolithic headers with the kitchen sink thrown in. It becomes 
difficult to work out exactly what does apply where.

I guess alternatively, if it were in a single package, then it would be 
better to break it into different files, and only the correct files are 
used according to the configuration. A bit like the SH3 or SH4 HALs (I 
suggest looking at those to see what I mean). Those had to deal with the 
same sorts of problems - peripherals in various implementations combined 
in different ways.

IMHO.

For example, consider the cache and MMU stuff. That really shouldn't 
belong in the AT91 HAL. At least not the existing form of AT91 HAL. At the 
very least you can't have hal_cache.h and var_io.h in both the ARM9 HAL 
and the AT91 HAL, so _something_ will have to be majorly reorganised.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine

      reply	other threads:[~2008-11-25 22:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 18:46 at91sam9263ek Evgeniy Dushistov
2008-11-10  9:21 ` at91sam9263ek Andrew Lunn
2008-11-11 18:55   ` [PATCH] [RFC] at91sam9263ek support Evgeniy Dushistov
2008-11-26 15:06     ` roberto.lavarini
2008-11-27 19:07       ` Evgeniy Dushistov
2008-11-28 11:04         ` roberto.lavarini
     [not found]           ` <E1L61JP-000FPO-00.dushistov-mail-ru@f224.mail.ru>
     [not found]             ` <e7aaf8e40811280706u6cd9579es556e7bb44ee93021@mail.gmail.com>
2008-11-29 18:22               ` Re[2]: " Evgeniy Dushistov
2008-12-02  9:39                 ` roberto.lavarini
2008-12-02 11:21                   ` Re[4]: " Evgeniy Dushistov
2008-11-18 16:38   ` at91sam9263ek Jonathan Larmour
2008-11-25 20:51     ` at91sam9263ek Evgeniy Dushistov
2008-11-25 22:58       ` Jonathan Larmour [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492C82BF.6090502@eCosCentric.com \
    --to=jifl@ecoscentric.com \
    --cc=andrew@lunn.ch \
    --cc=dushistov@mail.ru \
    --cc=ecos-devel@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).