Hi,

> On Thu, Sep 02, 2010 at 05:11:56PM +0200, Lothar Waßmann wrote:
> > > > -       if (cpu_is_mx25() || cpu_is_mx31() || cpu_is_mx35()) {
> > > > +       /* i.MX51 has two eCSPI and one CSPI controllers, eCSPI 
> > > > controllers are
> > > > +        * not compatible with existing SPI controllers on other i.MX 
> > > > platforms,
> > > > +        * while CSPI controller is 100% compatible with the one on the 
> > > > i.MX35.
> > > > +        * We set the platform device id to 2 for this CSPI at i.MX51 
> > > > board init
> > > > +        * level to distinguish it from two eCSPI controllers.
> > > > +        */
> > > This comment is missing in Sascha's driver.  I like it.
> > > BTW, I'd like to make use of platform ids in this driver.  This would
> > > make this ugly "on imx51 id2 is a cspi" distinction unnecessary.
> > > 
> > > > +       if (cpu_is_mx25() || cpu_is_mx31() || cpu_is_mx35() ||
> > > > +           (cpu_is_mx51() && (pdev->id == 2))) {
> > I'd prefer a flag in the platform_data that tells the driver to act as
> > an eCSPI driver. This way the information about eCSPI or not would be
> > where it belongs (in the arch specific code).
> 
> But this also increases the size of driver code, since the compiler can 
> resolve cpu_is_* at compile time, and drop the dead code. Maybe an is_ecspi 
> macro will make the above code clearer.
> 
I did not mean to remove the cpu_is_* macros, but use the explicit
ecspi flag instead of the comparison with pdev->id.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | i...@karo-electronics.de
___________________________________________________________

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to