From: Mike Frysinger Date: Wed, 4 Feb 2009 20:31:46 -0500 Subject: [U-Boot] [PATCH 1/9] i.MX31: fix SPI driver for shorter than 32 bit transfers In-Reply-To: <20090204223945.GD31498@game.jcrosoft.org> References: <20090204223945.GD31498@game.jcrosoft.org> Message-ID: <200902042031.48330.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > > > > 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