From f03c1f5aeacb58c9254c80377cce945b79b805a6 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Tue, 23 May 2017 22:56:04 +0800 Subject: [PATCH] spi: sunxi: fix tx buf After a fifo length of data is sent to tx fifo, the tx buffer should be offseted. Do this offset after the transfer. Signed-off-by: Icenowy Zheng --- drivers/spi/sunxi_spi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/sunxi_spi.c b/drivers/spi/sunxi_spi.c index 7ef3142396..254c69de86 100644 --- a/drivers/spi/sunxi_spi.c +++ b/drivers/spi/sunxi_spi.c @@ -273,6 +273,9 @@ static int sunxi_spi_xfer(struct udevice *dev, unsigned int bitlen, } len -= nbytes; + + if (tx_buf) + tx_buf += nbytes; } if (flags & SPI_XFER_END)