Commit a82ba3a3 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks

This is required since commit 2025172e "spi/bitbang: Use core message pump".
spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
spi_master_resume to stop/start the queue while suspend/resume.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent eeb71395
...@@ -748,6 +748,11 @@ static int spi_sirfsoc_suspend(struct device *dev) ...@@ -748,6 +748,11 @@ static int spi_sirfsoc_suspend(struct device *dev)
{ {
struct spi_master *master = dev_get_drvdata(dev); struct spi_master *master = dev_get_drvdata(dev);
struct sirfsoc_spi *sspi = spi_master_get_devdata(master); struct sirfsoc_spi *sspi = spi_master_get_devdata(master);
int ret;
ret = spi_master_suspend(master);
if (ret)
return ret;
clk_disable(sspi->clk); clk_disable(sspi->clk);
return 0; return 0;
...@@ -764,7 +769,7 @@ static int spi_sirfsoc_resume(struct device *dev) ...@@ -764,7 +769,7 @@ static int spi_sirfsoc_resume(struct device *dev)
writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_RXFIFO_OP); writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_RXFIFO_OP);
writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP); writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
return 0; return spi_master_resume(master);
} }
#endif #endif
......
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