summaryrefslogtreecommitdiff
path: root/drivers/spi/mxc_spi.c
diff options
context:
space:
mode:
authorTimo Herbrecher <t.herbrecher@gateware.de>2013-10-16 00:05:09 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-10-16 00:14:30 +0530
commit6d5ce1bd0048617d48c05de1a84fae8696081127 (patch)
tree1cb215f143ee4b67a25145121d75e16b135bd993 /drivers/spi/mxc_spi.c
parent21497ded5d14be17085c1069701097372856d360 (diff)
downloadu-boot-imx-6d5ce1bd0048617d48c05de1a84fae8696081127.zip
u-boot-imx-6d5ce1bd0048617d48c05de1a84fae8696081127.tar.gz
u-boot-imx-6d5ce1bd0048617d48c05de1a84fae8696081127.tar.bz2
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 <t.herbrecher@gateware.de> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Diffstat (limited to 'drivers/spi/mxc_spi.c')
-rw-r--r--drivers/spi/mxc_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index fd72a65..95dd03f 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(&regs->txdata, data);