From: Siva Durga Prasad Paladugu Date: Tue, 15 Dec 2015 09:56:02 +0000 (+0530) Subject: zynqmp: qspi: Move the trasmit buffer pointer X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23681b62df71dfb3e4c9cf676366c9d074e42f93;p=thirdparty%2Fu-boot.git zynqmp: qspi: Move the trasmit buffer pointer Move the transmit buffer pointer by the size we already sent. This fixes the issue of qspi write if the length to be written is not the exponent of 2. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/spi/zynqmp_qspi.c b/drivers/spi/zynqmp_qspi.c index ca1be911025..2bac7cd802d 100644 --- a/drivers/spi/zynqmp_qspi.c +++ b/drivers/spi/zynqmp_qspi.c @@ -385,6 +385,7 @@ static int zynqmp_qspi_fill_tx_fifo(struct zynqmp_qspi_priv *priv, u32 size) u32 timeout = 10000000; struct zynqmp_qspi_regs *regs = priv->regs; u32 *buf = (u32 *)priv->tx_buf; + u32 len = size; debug("TxFIFO: 0x%x, size: 0x%x\n", readl(®s->isr), size); @@ -428,6 +429,7 @@ static int zynqmp_qspi_fill_tx_fifo(struct zynqmp_qspi_priv *priv, u32 size) return -1; } + priv->tx_buf += len; return 0; }