aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDaniel Ribeiro <drwyrm@gmail.com>2009-04-21 15:24:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 16:41:49 -0400
commit148da331200a0df8195e10eb8a38fd77bd7003af (patch)
tree73c24340fe39aa12fa9a31997ace8ce95448bc68 /drivers/spi
parentaa0b8f3687f06ac0e5a2b24547fdf431e923c475 (diff)
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)
1700 struct ssp_device *ssp = drv_data->ssp; 1700 struct ssp_device *ssp = drv_data->ssp;
1701 int status = 0; 1701 int status = 0;
1702 1702
1703 if (drv_data->rx_channel != -1)
1704 DRCMR(drv_data->ssp->drcmr_rx) =
1705 DRCMR_MAPVLD | drv_data->rx_channel;
1706 if (drv_data->tx_channel != -1)
1707 DRCMR(drv_data->ssp->drcmr_tx) =
1708 DRCMR_MAPVLD | drv_data->tx_channel;
1709
1703 /* Enable the SSP clock */ 1710 /* Enable the SSP clock */
1704 clk_enable(ssp->clk); 1711 clk_enable(ssp->clk);
1705 1712