提交 6d5ce1bd 编写于 作者: T Timo Herbrecher 提交者: Jagannadha Sutradharudu Teki

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: NTimo Herbrecher <t.herbrecher@gateware.de>
Signed-off-by: NJagannadha Sutradharudu Teki <jaganna@xilinx.com>
上级 21497ded
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册