linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: atmel-quadspi: Disable the QSPI IP at suspend()
@ 2021-02-10 13:54 Tudor Ambarus
  2021-02-11 15:39 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Tudor Ambarus @ 2021-02-10 13:54 UTC (permalink / raw)
  To: broonie
  Cc: nicolas.ferre, alexandre.belloni, ludovic.desroches, linux-spi,
	linux-arm-kernel, linux-kernel, Tudor Ambarus

It is safer to disable the QSPI IP at suspend, in order to avoid
possible impact of glitches on the internal FSMs. This is a theoretical
fix, there were no problems seen as of now. Tested on sama5d2 and
sam9x60 versions of the IP.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/spi/atmel-quadspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 10bc5390ab91..95d4fa32c299 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -657,6 +657,7 @@ static int __maybe_unused atmel_qspi_suspend(struct device *dev)
 	struct spi_controller *ctrl = dev_get_drvdata(dev);
 	struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
 
+	atmel_qspi_write(QSPI_CR_QSPIDIS, aq, QSPI_CR);
 	clk_disable_unprepare(aq->qspick);
 	clk_disable_unprepare(aq->pclk);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: atmel-quadspi: Disable the QSPI IP at suspend()
  2021-02-10 13:54 [PATCH] spi: atmel-quadspi: Disable the QSPI IP at suspend() Tudor Ambarus
@ 2021-02-11 15:39 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-02-11 15:39 UTC (permalink / raw)
  To: Tudor Ambarus
  Cc: linux-kernel, alexandre.belloni, linux-spi, ludovic.desroches,
	linux-arm-kernel

On Wed, 10 Feb 2021 15:54:28 +0200, Tudor Ambarus wrote:
> It is safer to disable the QSPI IP at suspend, in order to avoid
> possible impact of glitches on the internal FSMs. This is a theoretical
> fix, there were no problems seen as of now. Tested on sama5d2 and
> sam9x60 versions of the IP.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: atmel-quadspi: Disable the QSPI IP at suspend()
      commit: df6978b7ea6349eb32078c42b917559f5510aebd

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-11 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 13:54 [PATCH] spi: atmel-quadspi: Disable the QSPI IP at suspend() Tudor Ambarus
2021-02-11 15:39 ` 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).