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>
This commit is contained in:
Timo Herbrecher 2013-10-16 00:05:09 +05:30 committed by Jagannadha Sutradharudu Teki
parent 21497ded5d
commit 6d5ce1bd00

View file

@ -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);