[U-Boot] [PATCH] mx28: fix i.MX28 spi driver

Matthias Fuchs matthias.fuchs at esd.eu
Sun Jan 15 19:36:19 CET 2012


On 01/15/2012 04:28 PM, Fabio Estevam wrote:
> On Sun, Jan 15, 2012 at 10:10 AM, Matthias Fuchs <matthias.fuchs at esd.eu> wrote:
> 
>> That's what I also tried. But from the ref manual I got no idea.
>> When we do not find a hy to deassert the chip select manually, we cannot
>> avoid this read.
> 
> I was assuming that the chip select deassertion was correctly being
> handled by the
> mxs_spi_end_xfer function.
> 
> This function handles the LOCK_CS and IGNORE_CRC bits that are
> responsible for chip select assertion/deassertion.
> 
> From the MX28 Reference Manual:
> 
> "IGNORE_CRC bit: In SPI/SSI modes: When set to 1, deassert the chip
> select (SSn) pin after the command is executed."
Exactly. That's the point. It says "... after the command ...". So you need 
a transfer after calling mxs_spi_end_xfer(). That's why the current code calls
it before transferring the final byte. 

Matthias

> 
> Then I tought that mxs_spi_end_xfer should be also called in the case
> where bitlen==0. In current code this does not happen.
> 
>> It seems that the mainline linux only implements a GPIO based SPI driver.
>> So we cannot take it for reference.
> 
> There is no mxs spi driver in the mainline kernel yet.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list