]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynqmp: qspi: Move the trasmit buffer pointer
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 15 Dec 2015 09:56:02 +0000 (15:26 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 15 Dec 2015 12:56:47 +0000 (13:56 +0100)
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/spi/zynqmp_qspi.c

index ca1be91102526038cc1c45a96b01b28416af02b1..2bac7cd802d5f6e31d6c415b4c94289e0cc187b4 100644 (file)
@@ -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(&regs->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;
 }