RFC: cpm2_devices.c

Dan Malek dan at embeddededge.com
Fri Jun 17 05:33:00 EST 2005


On Jun 16, 2005, at 11:33 AM, Kumar Gala wrote:

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

Yes, that's correct.  However, some of the other devices may be more
challenging, since the set up SCC ports involves accessing multiple
areas of the CPM (parameter ram, device control, BRGs, serial mux,
TDM, etc), for example.  This is why I created the whole immap structure
in the first place.  With a single pointer to it, plus knowing the usage
of the device, I could easily get to all of the necessary spaces.
Using the resource reservation isn't always appropriate either, because
there are lots of shared registers or device spaces in the CPM.  It
may keep you from multiply using a specific SCC, but there are many
other places requiring configuration that are more likely to be
improperly configured by other drivers.

Also, I'm not a fan of the gfar_read/write functions because I never
know their implementation :-)  They use the in/out macros which I
never know if they are for PCI IO or not.  We aren't using any
pipeline synchronization, which we may need.  By the way, I do like
using separate synchronization, not hidden in the in/out functions.

Thanks.


	-- Dan




More information about the Linuxppc-embedded mailing list