On Thu, 22 Nov 2012 10:26:15 +0100, Andreas Larsson <andr...@gaisler.com> wrote:
> I am looking into writing a driver for a core running on sparc that is mostly
> but not entirely compatible with the cpu mode of spi-fsl-spi. I am thinking of
> what could be the best approach for realizing this. Any comments on a 
> preferred
> approach in this situation?
> 
> These are two different approaches I see to solve the situation without too 
> much
> code duplication:
> 
> Appproach A: Extend spi-fsl-spi and spi-fsl-lib to work outside of a FSL SOC
> environtment and outside powerpc. This would require ifdefs for the driver to 
> be
> able to compile and work on sparc (or other platforms) - see patch draft at 
> the
> end. Everything that has to do with cpm and sysdev/fsl_soc.h needs to be 
> within
> ifdefs. Then the core in question could be added as another "mode" in the
> spi-fsl-spi driver with core specific code embedded inside spi-fsl-spi.c just 
> as
> for the other existing modes.

>From what you've shown, I would support this approach.  The proof is in
what the final patch looks like though.

g.


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to