Commit 6d5ce1bd0048617d48c05de1a84fae8696081127

Authored by Timo Herbrecher
Committed by Jagannadha Sutradharudu Teki
1 parent 21497ded5d

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/spi/mxc_spi.c
... ... @@ -255,8 +255,8 @@
255 255 } else {
256 256 data = *(u32 *)dout;
257 257 data = cpu_to_be32(data);
  258 + dout += 4;
258 259 }
259   - dout += 4;
260 260 }
261 261 debug("Sending SPI 0x%x\n", data);
262 262 reg_write(&regs->txdata, data);