From 9f09bd66064cd3a00631d54e579b1fb2baa0b262 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Mar 2017 20:20:37 +0100 Subject: ipq806x: refresh patches Signed-off-by: Felix Fietkau --- ...ow-block-mode-to-generate-multiple-transa.patch | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'target/linux/ipq806x/patches-4.9/0014-spi-qup-allow-block-mode-to-generate-multiple-transa.patch') diff --git a/target/linux/ipq806x/patches-4.9/0014-spi-qup-allow-block-mode-to-generate-multiple-transa.patch b/target/linux/ipq806x/patches-4.9/0014-spi-qup-allow-block-mode-to-generate-multiple-transa.patch index 6c275f61d3..19b36aaadd 100644 --- a/target/linux/ipq806x/patches-4.9/0014-spi-qup-allow-block-mode-to-generate-multiple-transa.patch +++ b/target/linux/ipq806x/patches-4.9/0014-spi-qup-allow-block-mode-to-generate-multiple-transa.patch @@ -173,37 +173,37 @@ Signed-off-by: Matthew McClintock + qup->n_words = SPI_MAX_XFER; + else + qup->n_words = n_words % SPI_MAX_XFER; -+ + +- if (qup->mode == QUP_IO_M_MODE_FIFO) +- spi_qup_write(qup, xfer); + if (qup->tx_buf && offset) + qup->tx_buf = xfer->tx_buf + offset * SPI_MAX_XFER; -+ + +- ret = spi_qup_set_state(qup, QUP_STATE_RUN); +- if (ret) { +- dev_warn(qup->dev, "cannot set RUN state\n"); +- return ret; +- } + if (qup->rx_buf && offset) + qup->rx_buf = xfer->rx_buf + offset * SPI_MAX_XFER; -+ + +- if (!wait_for_completion_timeout(&qup->done, timeout)) +- return -ETIMEDOUT; + /* if the transaction is small enough, we need + * to fallback to FIFO mode */ + if (qup->n_words <= (qup->in_fifo_sz / sizeof(u32))) + qup->mode = QUP_IO_M_MODE_FIFO; - -- if (qup->mode == QUP_IO_M_MODE_FIFO) -- spi_qup_write(qup, xfer); ++ + ret = spi_qup_io_config(spi, xfer); + if (ret) + return ret; - -- ret = spi_qup_set_state(qup, QUP_STATE_RUN); -- if (ret) { -- dev_warn(qup->dev, "cannot set RUN state\n"); -- return ret; -- } ++ + ret = spi_qup_set_state(qup, QUP_STATE_RUN); + if (ret) { + dev_warn(qup->dev, "cannot set RUN state\n"); + return ret; + } - -- if (!wait_for_completion_timeout(&qup->done, timeout)) -- return -ETIMEDOUT; ++ + ret = spi_qup_set_state(qup, QUP_STATE_PAUSE); + if (ret) { + dev_warn(qup->dev, "cannot set PAUSE state\n"); -- cgit v1.2.3