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

Fabio Estevam festevam at gmail.com
Sat Jan 14 19:54:50 CET 2012


On Sat, Jan 14, 2012 at 4:53 PM, Fabio Estevam <festevam at gmail.com> wrote:

> Actually I meant this:

One more time ;-)

--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -130,13 +130,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
        const char *tx = dout;
        char *rx = din;

-       if (bitlen == 0)
-               return 0;
-
        if (!rx && !tx)
                return 0;

-       if (flags & SPI_XFER_BEGIN)
+       if ((flags & SPI_XFER_BEGIN) && len)
                mxs_spi_start_xfer(ssp_regs);

        while (len--) {


More information about the U-Boot mailing list