summaryrefslogtreecommitdiffstats
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
parent21497ded5d14be17085c1069701097372856d360 (diff)
downloadtalos-obmc-uboot-6d5ce1bd0048617d48c05de1a84fae8696081127.tar.gz
talos-obmc-uboot-6d5ce1bd0048617d48c05de1a84fae8696081127.zip
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>
-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 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(&regs->txdata, data);
OpenPOWER on IntegriCloud