* [PATCH] spi: pxa2xx_spi.c restore DRCMR on resume.
@ 2009-04-08 14:00 Daniel Ribeiro
0 siblings, 0 replies; only message in thread
From: Daniel Ribeiro @ 2009-04-08 14:00 UTC (permalink / raw)
To: spi-devel-general
Cc: Ned Forrester, David Brownell, openezx-devel, Eric Miao,
linux-arm-kernel
If DMA is enabled, any spi_sync call after suspend/resume would block forever,
because DRCMR is lost on suspend. This patch restores DRCMR to the same values
set by probe.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
---
drivers/spi/pxa2xx_spi.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index c1688c7..79d7341 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1700,6 +1700,13 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
struct ssp_device *ssp = drv_data->ssp;
int status = 0;
+ if (drv_data->rx_channel != -1)
+ DRCMR(drv_data->ssp->drcmr_rx) =
+ DRCMR_MAPVLD | drv_data->rx_channel;
+ if (drv_data->tx_channel != -1)
+ DRCMR(drv_data->ssp->drcmr_tx) =
+ DRCMR_MAPVLD | drv_data->tx_channel;
+
/* Enable the SSP clock */
clk_enable(ssp->clk);
--
tg: (577c9c4..) spi/pxa2xx_spi-fix-dma-resume (depends on: master)
total: 0 errors, 0 warnings, 13 lines checked
pxa2xx_spi-fix-dma-resume.patch has no obvious style problems and is ready for submission.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-08 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 14:00 [PATCH] spi: pxa2xx_spi.c restore DRCMR on resume Daniel Ribeiro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.