RFC: cpm2_devices.c
Dan Malek
dan at embeddededge.com
Fri Jun 17 01:12:24 EST 2005
On Jun 15, 2005, at 12:13 AM, Kumar Gala wrote:
>> 2. I am torn about using numeric IMMR offsets vs. the structure member
>> approach. The good thing is that you can create all the devices in a
>> single table even if they overlay depending on processor. The question
>> is, will the IMMAP structure become obsolete? If not, then you will
>> still need the conditional compiles in immap_cpm2.h.
>
> I'm trying to stay away from basing things on the structure. Since
> the offsets are truly fixed I see not reason to try to make sure that
> the immap structure is always correct for all cases.
Having just converted an different SoC part from using offsets to data
structures, I have to say that tables/defines of offsets are more of a
mess
than a data structure. We don't have to define the whole of the IMMAP,
but
using the data structures for the individual device spaces is quite
effective.
The advantage of using the data structure is it also conveys the data
type
size, adding a level error checking. I also dislike io accessor
functions/macros,
especially on these processor specific devices.
Thanks.
-- Dan
More information about the Linuxppc-embedded
mailing list