From 148da331200a0df8195e10eb8a38fd77bd7003af Mon Sep 17 00:00:00 2001 From: Daniel Ribeiro Date: Tue, 21 Apr 2009 12:24:43 -0700 Subject: [PATCH] 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 Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/pxa2xx_spi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index c76feea5fe2..1a00b415bcc 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); -- 2.11.4.GIT