From: Daniel Ribeiro <drwyrm@gmail.com>
To: spi-devel-general <spi-devel-general@lists.sourceforge.net>
Cc: Ned Forrester <nforrester@whoi.edu>,
David Brownell <david-b@pacbell.net>,
openezx-devel <openezx-devel@lists.openezx.org>,
Eric Miao <eric.y.miao@gmail.com>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>
Subject: [PATCH] spi: pxa2xx_spi.c restore DRCMR on resume.
Date: Wed, 08 Apr 2009 11:00:38 -0300 [thread overview]
Message-ID: <1239199238.20192.16.camel@brutus> (raw)
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>
---
drivers/spi/pxa2xx_spi.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index c1688c7..79d7341 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);
--
tg: (577c9c4..) spi/pxa2xx_spi-fix-dma-resume (depends on: master)
total: 0 errors, 0 warnings, 13 lines checked
pxa2xx_spi-fix-dma-resume.patch has no obvious style problems and is ready for submission.
reply other threads:[~2009-04-08 14:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239199238.20192.16.camel@brutus \
--to=drwyrm@gmail.com \
--cc=david-b@pacbell.net \
--cc=eric.y.miao@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=nforrester@whoi.edu \
--cc=openezx-devel@lists.openezx.org \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.