From: Timo Herbrecher Date: Tue, 15 Oct 2013 18:35:09 +0000 (+0530) Subject: spi: mxc_spi: Fix double incrementing read pointer for unaligned buffers X-Git-Tag: v2013.10~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d5ce1bd0048617d48c05de1a84fae8696081127;p=u-boot spi: mxc_spi: Fix double incrementing read pointer for unaligned buffers If dout buffer is not 32 bit-aligned or data to transmit is not multiple of 32 bit the read data pointer is already incremented on single byte reads. Signed-off-by: Timo Herbrecher Signed-off-by: Jagannadha Sutradharudu Teki --- diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index fd72a65d3a..95dd03f7b3 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -255,8 +255,8 @@ int spi_xchg_single(struct spi_slave *slave, unsigned int bitlen, } else { data = *(u32 *)dout; data = cpu_to_be32(data); + dout += 4; } - dout += 4; } debug("Sending SPI 0x%x\n", data); reg_write(®s->txdata, data);