[U-Boot] [PATCH] SPI: Fix 32 bit transfers in mxc_spi.c
Magnus Lilja
lilja.magnus at gmail.com
Wed Nov 11 19:58:27 CET 2009
Commit f9b6a1575d9f1ca192e4cb60e547aa66f08baa3f, "i.MX31: fix SPI
driver for shorter than 32 bit" broke 32 bit transfers. This patch
makes single 32 bit transfer work again.
Tested on i.MX31 Litekit and i.MX31 PDK using 32 bit transfers to
the MC13783/ATLAS chip (using the 'date' command).
Signed-off-by: Magnus Lilja <lilja.magnus at gmail.com>
Cc: Guennadi Liakhovetski <lg at denx.de>
---
I don't think transfers larger than 32 bits will work. It seems
like they worked in the original driver, but the above commit broke that.
This patch does not try to fix that problem.
drivers/spi/mxc_spi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index fad9840..8b5d4be 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -142,6 +142,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
*(u8 *)din = data;
else if (bitlen < 17)
*(u16 *)din = data;
+ else
+ *in_l = data;
}
}
--
1.5.6
More information about the U-Boot
mailing list