Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 148da331 authored by Daniel Ribeiro's avatar Daniel Ribeiro Committed by Linus Torvalds
Browse files

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: default avatarDaniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent aa0b8f36
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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);