Commit df6978b7 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Mark Brown

spi: atmel-quadspi: Disable the QSPI IP at suspend()

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: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210210135428.204134-1-tudor.ambarus@microchip.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 58898fd8
...@@ -657,6 +657,7 @@ static int __maybe_unused atmel_qspi_suspend(struct device *dev) ...@@ -657,6 +657,7 @@ static int __maybe_unused atmel_qspi_suspend(struct device *dev)
struct spi_controller *ctrl = dev_get_drvdata(dev); struct spi_controller *ctrl = dev_get_drvdata(dev);
struct atmel_qspi *aq = spi_controller_get_devdata(ctrl); 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->qspick);
clk_disable_unprepare(aq->pclk); clk_disable_unprepare(aq->pclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment