This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
RE: AT91 ADC support
Whenever I encounter a situation like this the most generic way to deal
with it is:
- extend the driver to support more than 1 ADC device
- make it a configuration (CDL?) parameter how many channels an ADC
device supports
This way the footprint is minimized:
The same code is shared for more than 1 channel - as opposed to
duplicating the code for a 2nd ADC.
If you need/want to quench the last byte out of the footprint you could
even conceive an additional config CDL param: single device support vs.
multi device support.
Not sure if you want to entertain this idea in this case - it's too far
off wrt. my ecos usage and experience. And if the driver footprint is
small anyway - it might not be worth the effort.
Just my 3 cents (or is it only 2 ;-) )
Kurt
P.S.: Yes - I do use ecos. But I inherited an ecos 1.3 which I keep
alive for the time being. And which I have adapted to our latest HW -
with a 2-level cache architecture (Xscale 1 ==> Xscale 3). Unfortunatly
(for ecos) my constraints are such that I can't contribute back much to
ecos - I'm too busy otherwise.
-----Original Message-----
From: ecos-patches-owner@ecos.sourceware.org
[mailto:ecos-patches-owner@ecos.sourceware.org] On Behalf Of John
Dallaway
Sent: Thursday, May 27, 2010 9:08 AM
To: Christophe Coutand
Cc: Sergei Gavrikov; ecos-patches@ecos.sourceware.org
Subject: Re: AT91 ADC support
Hi Christophe
Christophe Coutand wrote:
> It's pretty easy to add the required definition for the AT91M55800A
> targets. The only thing I see now is that this device contains 2 ADCs
> which I have not considered before. I guess there are several ways out
> of this:
>
> 1- Update the actual AT91 ADC driver to make full use of the
AT91M55800A
> targets. I guess should be done by loading a second ADC instance (one
> for each ADC. I have not been through all the thinking here...).
>
> 2- or limit the AT91 driver to use only ADC0 of the AT91M55800A target
> for the time being.
>
> 3- or exclude AT91M55800A targets for the time being.
>
> IMO #1 is best but I cannot give any time frame for completing it.
In that case, I would suggest option #2 for now. Someone else (who has
an AT91M55800A on their desk) may be interested in adding support for
the second ADC.
John Dallaway
eCos maintainer