* [PATCH] dt-bindings: spi: stm32-qspi: add dma properties @ 2019-06-27 7:43 Ludovic Barre 2019-06-27 7:43 ` [PATCH] spi: stm32-qspi: remove signal sensitive on completion Ludovic Barre 2019-06-28 16:56 ` Applied "dt-bindings: spi: stm32-qspi: add dma properties" " Mark Brown 0 siblings, 2 replies; 4+ messages in thread From: Ludovic Barre @ 2019-06-27 7:43 UTC (permalink / raw) To: Mark Brown, Marek Vasut, Boris Brezillon, Rob Herring Cc: devicetree, Alexandre Torgue, linux-kernel, linux-spi, linux-mtd, Ludovic Barre, Maxime Coquelin, linux-stm32, linux-arm-kernel From: Ludovic Barre <ludovic.barre@st.com> This patch adds description of dma properties (optional). Signed-off-by: Ludovic Barre <ludovic.barre@st.com> --- Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt b/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt index adeeb63..bfc038b 100644 --- a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt @@ -19,8 +19,11 @@ Required properties: - reg: chip-Select number (QSPI controller may connect 2 flashes) - spi-max-frequency: max frequency of spi bus -Optional property: +Optional properties: - spi-rx-bus-width: see ./spi-bus.txt for the description +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, +Documentation/devicetree/bindings/dma/dma.txt. +- dma-names: DMA request names should include "tx" and "rx" if present. Example: -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] spi: stm32-qspi: remove signal sensitive on completion 2019-06-27 7:43 [PATCH] dt-bindings: spi: stm32-qspi: add dma properties Ludovic Barre @ 2019-06-27 7:43 ` Ludovic Barre 2019-06-28 16:56 ` Applied "spi: stm32-qspi: remove signal sensitive on completion" to the spi tree Mark Brown 2019-06-28 16:56 ` Applied "dt-bindings: spi: stm32-qspi: add dma properties" " Mark Brown 1 sibling, 1 reply; 4+ messages in thread From: Ludovic Barre @ 2019-06-27 7:43 UTC (permalink / raw) To: Mark Brown, Marek Vasut, Boris Brezillon, Rob Herring Cc: devicetree, Alexandre Torgue, linux-kernel, linux-spi, linux-mtd, Ludovic Barre, Maxime Coquelin, linux-stm32, linux-arm-kernel From: Ludovic Barre <ludovic.barre@st.com> On umount step a sigkill signal is set (without user specific action), due to sigkill signal the completion will be interrupted and the data transfer can't be finished if a sync is needed. Signed-off-by: Ludovic Barre <ludovic.barre@st.com> --- drivers/spi/spi-stm32-qspi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 5dbb6a8..655e4af 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -245,12 +245,8 @@ static int stm32_qspi_tx_dma(struct stm32_qspi *qspi, writel_relaxed(cr | CR_DMAEN, qspi->io_base + QSPI_CR); t_out = sgt.nents * STM32_COMP_TIMEOUT_MS; - if (!wait_for_completion_interruptible_timeout(&qspi->dma_completion, - msecs_to_jiffies(t_out))) - err = -ETIMEDOUT; - - if (dma_async_is_tx_complete(dma_ch, cookie, - NULL, NULL) != DMA_COMPLETE) + if (!wait_for_completion_timeout(&qspi->dma_completion, + msecs_to_jiffies(t_out))) err = -ETIMEDOUT; if (err) @@ -304,7 +300,7 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, cr = readl_relaxed(qspi->io_base + QSPI_CR); writel_relaxed(cr | CR_TCIE | CR_TEIE, qspi->io_base + QSPI_CR); - if (!wait_for_completion_interruptible_timeout(&qspi->data_completion, + if (!wait_for_completion_timeout(&qspi->data_completion, msecs_to_jiffies(STM32_COMP_TIMEOUT_MS))) { err = -ETIMEDOUT; } else { -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "spi: stm32-qspi: remove signal sensitive on completion" to the spi tree 2019-06-27 7:43 ` [PATCH] spi: stm32-qspi: remove signal sensitive on completion Ludovic Barre @ 2019-06-28 16:56 ` Mark Brown 0 siblings, 0 replies; 4+ messages in thread From: Mark Brown @ 2019-06-28 16:56 UTC (permalink / raw) To: Ludovic Barre Cc: devicetree, Alexandre Torgue, Boris Brezillon, linux-kernel, Rob Herring, linux-spi, Marek Vasut, Mark Brown, linux-mtd, Maxime Coquelin, linux-stm32, linux-arm-kernel The patch spi: stm32-qspi: remove signal sensitive on completion has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 775c4c0032c408b8a57a3fc2695eeda101da003a Mon Sep 17 00:00:00 2001 From: Ludovic Barre <ludovic.barre@st.com> Date: Thu, 27 Jun 2019 09:43:59 +0200 Subject: [PATCH] spi: stm32-qspi: remove signal sensitive on completion On umount step a sigkill signal is set (without user specific action), due to sigkill signal the completion will be interrupted and the data transfer can't be finished if a sync is needed. Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- drivers/spi/spi-stm32-qspi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 42f8e3c6aa1f..0b07182f5660 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -245,12 +245,8 @@ static int stm32_qspi_tx_dma(struct stm32_qspi *qspi, writel_relaxed(cr | CR_DMAEN, qspi->io_base + QSPI_CR); t_out = sgt.nents * STM32_COMP_TIMEOUT_MS; - if (!wait_for_completion_interruptible_timeout(&qspi->dma_completion, - msecs_to_jiffies(t_out))) - err = -ETIMEDOUT; - - if (dma_async_is_tx_complete(dma_ch, cookie, - NULL, NULL) != DMA_COMPLETE) + if (!wait_for_completion_timeout(&qspi->dma_completion, + msecs_to_jiffies(t_out))) err = -ETIMEDOUT; if (err) @@ -304,7 +300,7 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, cr = readl_relaxed(qspi->io_base + QSPI_CR); writel_relaxed(cr | CR_TCIE | CR_TEIE, qspi->io_base + QSPI_CR); - if (!wait_for_completion_interruptible_timeout(&qspi->data_completion, + if (!wait_for_completion_timeout(&qspi->data_completion, msecs_to_jiffies(STM32_COMP_TIMEOUT_MS))) { err = -ETIMEDOUT; } else { -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "dt-bindings: spi: stm32-qspi: add dma properties" to the spi tree 2019-06-27 7:43 [PATCH] dt-bindings: spi: stm32-qspi: add dma properties Ludovic Barre 2019-06-27 7:43 ` [PATCH] spi: stm32-qspi: remove signal sensitive on completion Ludovic Barre @ 2019-06-28 16:56 ` Mark Brown 1 sibling, 0 replies; 4+ messages in thread From: Mark Brown @ 2019-06-28 16:56 UTC (permalink / raw) To: Ludovic Barre Cc: devicetree, Alexandre Torgue, Boris Brezillon, linux-kernel, Rob Herring, linux-spi, Marek Vasut, Mark Brown, linux-mtd, Maxime Coquelin, linux-stm32, linux-arm-kernel The patch dt-bindings: spi: stm32-qspi: add dma properties has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From cae86eac98cd90934f94072028c362550338e084 Mon Sep 17 00:00:00 2001 From: Ludovic Barre <ludovic.barre@st.com> Date: Thu, 27 Jun 2019 09:43:58 +0200 Subject: [PATCH] dt-bindings: spi: stm32-qspi: add dma properties This patch adds description of dma properties (optional). Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt b/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt index adeeb63e84b9..bfc038b9478d 100644 --- a/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt @@ -19,8 +19,11 @@ Required properties: - reg: chip-Select number (QSPI controller may connect 2 flashes) - spi-max-frequency: max frequency of spi bus -Optional property: +Optional properties: - spi-rx-bus-width: see ./spi-bus.txt for the description +- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, +Documentation/devicetree/bindings/dma/dma.txt. +- dma-names: DMA request names should include "tx" and "rx" if present. Example: -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-28 16:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-27 7:43 [PATCH] dt-bindings: spi: stm32-qspi: add dma properties Ludovic Barre 2019-06-27 7:43 ` [PATCH] spi: stm32-qspi: remove signal sensitive on completion Ludovic Barre 2019-06-28 16:56 ` Applied "spi: stm32-qspi: remove signal sensitive on completion" to the spi tree Mark Brown 2019-06-28 16:56 ` Applied "dt-bindings: spi: stm32-qspi: add dma properties" " Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).