summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDaniel Ribeiro <drwyrm@gmail.com>2009-04-21 12:24:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 13:41:49 -0700
commit148da331200a0df8195e10eb8a38fd77bd7003af (patch)
tree73c24340fe39aa12fa9a31997ace8ce95448bc68 /drivers/spi
parentaa0b8f3687f06ac0e5a2b24547fdf431e923c475 (diff)
downloadlinux-148da331200a0df8195e10eb8a38fd77bd7003af.tar.gz
linux-148da331200a0df8195e10eb8a38fd77bd7003af.tar.bz2
linux-148da331200a0df8195e10eb8a38fd77bd7003af.zip
pxa2xx_spi: restore DRCMR on resume
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> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/pxa2xx_spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index c76feea5fe25..1a00b415bcc4 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);