pxa2xx_spi: restore DRCMR on resume
PATCH 1/1 pxa2xx_spi: restore DRCMR on resume
From: Daniel Ribeiro <[email protected]>
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 <[email protected]>
Signed-off-by David Brownell <[email protected]>
--- drivers/spi/pxa2xx_spi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/spi/pxa2xx_spi.c +7 -0
@@ -1700,6 +1700,13 @@ static int pxa2xx_spi_resume(struct platstruct 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);
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p