[U-Boot] [PATCH 1/9] i.MX31: fix SPI driver for shorter than 32 bit transfers

Mike Frysinger vapier at gentoo.org
Thu Feb 5 02:31:46 CET 2009


On Wednesday 04 February 2009 17:39:45 Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:59 Wed 04 Feb     , Guennadi Liakhovetski wrote:
> > Fix 8 and 16-bit transfers in mxc_spi driver and a wrong pointer in the
> > free routine.
> >
> > Signed-off-by: Guennadi Liakhovetski <lg at denx.de>
> > ---
> >
> > No SPI custodian, so, Jean-Christophe will have to Ack it?
>
> I'd like to have Mike and Haaward ack too

i dont have any arm hardware let alone familiar with any hardware-level things 
like the SPI controller.  so from a quick high level look ...

does this controller actually support transfers that arent a multiple of 8 ?  
if the smallest increment you can do is 8bits, then you should be rejecting 
anything that isnt a multiple of it rather than holding the user's hand.  as 
for the assumption that "more than 32bits means do 32bit transfers", that 
sounds plain wrong to me.  u-boot should do exactly as instructed and nothing 
more/less.  so if the user tries to send 40bits, that better be 40bits and not 
64bits.

the spi_free_slave() change looks correct ... not that it should change the 
generated code as spi_slave is the first member of mxc_spi_slave, so they'll 
be the same pointer and gcc will do the right thing.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090204/d6316726/attachment.pgp 


More information about the U-Boot mailing list