summaryrefslogtreecommitdiff
path: root/drivers/spi/mxc_spi.c
diff options
context:
space:
mode:
authorTimo Herbrecher <t.herbrecher@gateware.de>2013-10-15 18:35:09 (GMT)
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-10-15 18:44:30 (GMT)
commit6d5ce1bd0048617d48c05de1a84fae8696081127 (patch)
tree1cb215f143ee4b67a25145121d75e16b135bd993 /drivers/spi/mxc_spi.c
parent21497ded5d14be17085c1069701097372856d360 (diff)
downloadu-boot-fsl-qoriq-6d5ce1bd0048617d48c05de1a84fae8696081127.tar.xz
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);