aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-03-07 20:20:37 +0100
committerFelix Fietkau <nbd@nbd.name>2017-03-08 14:38:22 +0100
commit9f09bd66064cd3a00631d54e579b1fb2baa0b262 (patch)
tree289ac2db5e2d2369ea1dbd04a2998494951b800d /target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch
parentb6e3b7079097ccce6262891f9f1130bea3879aad (diff)
downloadupstream-9f09bd66064cd3a00631d54e579b1fb2baa0b262.tar.gz
upstream-9f09bd66064cd3a00631d54e579b1fb2baa0b262.tar.bz2
upstream-9f09bd66064cd3a00631d54e579b1fb2baa0b262.zip
ipq806x: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch')
-rw-r--r--target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch16
1 files changed, 7 insertions, 9 deletions
diff --git a/target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch b/target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch
index 7beb5d9701..c88dd9b0ec 100644
--- a/target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch
+++ b/target/linux/ipq806x/patches-4.9/0012-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch
@@ -67,10 +67,14 @@ Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
- /* must be zero for BLOCK and BAM */
- writel_relaxed(0, controller->base + QUP_MX_READ_CNT);
- writel_relaxed(0, controller->base + QUP_MX_WRITE_CNT);
--
++ else
++ controller->mode = QUP_IO_M_MODE_BLOCK;
+
- if (!controller->qup_v1) {
- void __iomem *input_cnt;
--
++ return 0;
++}
+
- input_cnt = controller->base + QUP_MX_INPUT_CNT;
- /*
- * for DMA transfers, both QUP_MX_INPUT_CNT and
@@ -82,19 +86,13 @@ Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
- writel_relaxed(0, input_cnt);
- else
- writel_relaxed(n_words, input_cnt);
-+ else
-+ controller->mode = QUP_IO_M_MODE_BLOCK;
-+
-+ return 0;
-+}
-
+/* prep qup for another spi transaction of specific type */
+static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer)
+{
+ struct spi_qup *controller = spi_master_get_devdata(spi->master);
+ u32 config, iomode, control;
+ unsigned long flags;
-+
+
+ reinit_completion(&controller->done);
+ reinit_completion(&controller->dma_tx_done);
+