[U-Boot] [PATCH] NET: add ENC28J60 driver using SPI framework

Mike Frysinger vapier at gentoo.org
Sat Sep 4 00:14:17 CEST 2010


On Friday, September 03, 2010 17:23:43 Reinhard Meyer wrote:
> On 03.09.2010 23:03, Mike Frysinger wrote:
> >> not sure, however, if calling spi_setup_slave() is ok at this point.
> > 
> > i believe the func should only doing validation on the arguments.  it
> > shouldnt need to talk to any actual hardware.  maybe this needs
> > codifying in the API documentation.
> 
> In atmel_spi.c it sets up the csr[indexed by cs=0..3] register with clock,
> phase and polarity.
> That's harmless, but might need some rethinking there.

i'm not familiar with the Atmel SPI controller, but my gut reaction is that 
register values should be calculated in spi_setup_slave(), stored in the 
internal xxx_spi_slave struct, and then written at spi_claim_bus() time.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100903/dd926dab/attachment.pgp 


More information about the U-Boot mailing list