RFC: cpm2_devices.c

Allen Curtis acurtis at onz.com
Fri Jun 17 01:42:08 EST 2005


> If I understand you correctly this is not any different than how we 
> handle the TSEC (gianfar) on 85xx.  The platform device structure just 
> gives us physical address (start & end) and IRQs and we use a 
> structure in the driver that maps to the start address.
>
> - kumar
>

So have we answered your question regarding the inclusion of DMA and 
CPM in the platform_device array? If I am reading this correctly, all 
the individual CPM "objects" should be defined in the device structure 
with their physical address location defined. The complete IMMAP 
structure can then be constructed from these objects if required.

Is it possible to add some flags to the IORESOURCE information to 
address the differences in SCC structures between processor types? 
Perhaps something like this could be used to apply the correct 
structure cast in the device driver. Just a thought...

-- Allen

>> 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