* [PATCH] mmc: tmio: fix PM in DMA mode
@ 2011-04-29 17:11 Guennadi Liakhovetski
2011-05-11 1:20 ` Chris Ball
0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2011-04-29 17:11 UTC (permalink / raw)
To: linux-sh; +Cc: linux-mmc, Magnus Damm, Simon Horman, Ian Molton
DMA mode has to be re-enabled during a resume.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/mmc/host/tmio_mmc_dma.c | 21 ++++++++++++---------
drivers/mmc/host/tmio_mmc_pio.c | 1 +
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
index d3de74a..25f1ad6 100644
--- a/drivers/mmc/host/tmio_mmc_dma.c
+++ b/drivers/mmc/host/tmio_mmc_dma.c
@@ -256,7 +256,10 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
{
/* We can only either use DMA for both Tx and Rx or not use it at all */
- if (pdata->dma) {
+ if (!pdata->dma)
+ return;
+
+ if (!host->chan_tx && !host->chan_rx) {
dma_cap_mask_t mask;
dma_cap_zero(mask);
@@ -284,18 +287,18 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
tasklet_init(&host->dma_complete, tmio_mmc_tasklet_fn, (unsigned long)host);
tasklet_init(&host->dma_issue, tmio_mmc_issue_tasklet_fn, (unsigned long)host);
+ }
- tmio_mmc_enable_dma(host, true);
+ tmio_mmc_enable_dma(host, true);
+
+ return;
- return;
ebouncebuf:
- dma_release_channel(host->chan_rx);
- host->chan_rx = NULL;
+ dma_release_channel(host->chan_rx);
+ host->chan_rx = NULL;
ereqrx:
- dma_release_channel(host->chan_tx);
- host->chan_tx = NULL;
- return;
- }
+ dma_release_channel(host->chan_tx);
+ host->chan_tx = NULL;
}
void tmio_mmc_release_dma(struct tmio_mmc_host *host)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 26598f1..27fc11c 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -995,6 +995,7 @@ int tmio_mmc_host_resume(struct device *dev)
pm_runtime_get_sync(dev);
tmio_mmc_reset(mmc_priv(mmc));
+ tmio_mmc_request_dma(host, host->pdata);
return mmc_resume_host(mmc);
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: tmio: fix PM in DMA mode
2011-04-29 17:11 [PATCH] mmc: tmio: fix PM in DMA mode Guennadi Liakhovetski
@ 2011-05-11 1:20 ` Chris Ball
2011-05-12 8:17 ` Guennadi Liakhovetski
0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2011-05-11 1:20 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Magnus Damm, Simon Horman, Ian Molton
Hi Guennadi,
On Fri, Apr 29 2011, Guennadi Liakhovetski wrote:
> DMA mode has to be re-enabled during a resume.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> drivers/mmc/host/tmio_mmc_dma.c | 21 ++++++++++++---------
> drivers/mmc/host/tmio_mmc_pio.c | 1 +
> 2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
> index d3de74a..25f1ad6 100644
> --- a/drivers/mmc/host/tmio_mmc_dma.c
> +++ b/drivers/mmc/host/tmio_mmc_dma.c
> @@ -256,7 +256,10 @@ static bool tmio_mmc_filter(struct dma_chan *chan, void *arg)
> void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata)
> {
> /* We can only either use DMA for both Tx and Rx or not use it at all */
> - if (pdata->dma) {
> + if (!pdata->dma)
> + return;
> +
> + if (!host->chan_tx && !host->chan_rx) {
> dma_cap_mask_t mask;
>
> dma_cap_zero(mask);
> @@ -284,18 +287,18 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
>
> tasklet_init(&host->dma_complete, tmio_mmc_tasklet_fn, (unsigned long)host);
> tasklet_init(&host->dma_issue, tmio_mmc_issue_tasklet_fn, (unsigned long)host);
> + }
>
> - tmio_mmc_enable_dma(host, true);
> + tmio_mmc_enable_dma(host, true);
> +
> + return;
>
> - return;
> ebouncebuf:
> - dma_release_channel(host->chan_rx);
> - host->chan_rx = NULL;
> + dma_release_channel(host->chan_rx);
> + host->chan_rx = NULL;
> ereqrx:
> - dma_release_channel(host->chan_tx);
> - host->chan_tx = NULL;
> - return;
> - }
> + dma_release_channel(host->chan_tx);
> + host->chan_tx = NULL;
> }
>
> void tmio_mmc_release_dma(struct tmio_mmc_host *host)
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index 26598f1..27fc11c 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -995,6 +995,7 @@ int tmio_mmc_host_resume(struct device *dev)
> pm_runtime_get_sync(dev);
>
> tmio_mmc_reset(mmc_priv(mmc));
> + tmio_mmc_request_dma(host, host->pdata);
>
> return mmc_resume_host(mmc);
> }
This patch doesn't apply against current mmc-next.
Please could you send a full patchset against mmc-next for tmio for .40?
Thanks!
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: tmio: fix PM in DMA mode
2011-05-11 1:20 ` Chris Ball
@ 2011-05-12 8:17 ` Guennadi Liakhovetski
2011-05-12 10:19 ` Guennadi Liakhovetski
0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-12 8:17 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-sh, linux-mmc, Magnus Damm, Simon Horman, Ian Molton
Hi Chris
On Tue, 10 May 2011, Chris Ball wrote:
> Hi Guennadi,
>
> On Fri, Apr 29 2011, Guennadi Liakhovetski wrote:
> > DMA mode has to be re-enabled during a resume.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> > drivers/mmc/host/tmio_mmc_dma.c | 21 ++++++++++++---------
> > drivers/mmc/host/tmio_mmc_pio.c | 1 +
> > 2 files changed, 13 insertions(+), 9 deletions(-)
[snip]
> Please could you send a full patchset against mmc-next for tmio for .40?
Can I also base my patches on next-2.6? I need both - latest mmc and pm,
so, using next would make it much easier.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: tmio: fix PM in DMA mode
2011-05-12 8:17 ` Guennadi Liakhovetski
@ 2011-05-12 10:19 ` Guennadi Liakhovetski
2011-05-12 22:12 ` Chris Ball
2011-05-26 1:24 ` Chris Ball
0 siblings, 2 replies; 6+ messages in thread
From: Guennadi Liakhovetski @ 2011-05-12 10:19 UTC (permalink / raw)
To: Chris Ball; +Cc: linux-sh, linux-mmc, Magnus Damm, Simon Horman, Ian Molton
On Thu, 12 May 2011, Guennadi Liakhovetski wrote:
> Hi Chris
>
> On Tue, 10 May 2011, Chris Ball wrote:
>
> > Hi Guennadi,
> >
> > On Fri, Apr 29 2011, Guennadi Liakhovetski wrote:
> > > DMA mode has to be re-enabled during a resume.
> > >
> > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > ---
> > > drivers/mmc/host/tmio_mmc_dma.c | 21 ++++++++++++---------
> > > drivers/mmc/host/tmio_mmc_pio.c | 1 +
> > > 2 files changed, 13 insertions(+), 9 deletions(-)
>
> [snip]
>
> > Please could you send a full patchset against mmc-next for tmio for .40?
>
> Can I also base my patches on next-2.6? I need both - latest mmc and pm,
> so, using next would make it much easier.
I rebased my stack on top of today's next, no changes were required, so,
here's the order, I have the patches in my tree:
https://patchwork.kernel.org/patch/711251/
https://patchwork.kernel.org/patch/757602/
https://patchwork.kernel.org/patch/757612/
https://patchwork.kernel.org/patch/724081/
https://patchwork.kernel.org/patch/761882/
https://patchwork.kernel.org/patch/761902/
https://patchwork.kernel.org/patch/761922/
https://patchwork.kernel.org/patch/761942/
https://patchwork.kernel.org/patch/777232/
https://patchwork.kernel.org/patch/777262/
As long as we manage to get these in 2.6.40 merge window early enough,
we'll be able to push related arch patches via shmobile trees.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: tmio: fix PM in DMA mode
2011-05-12 10:19 ` Guennadi Liakhovetski
@ 2011-05-12 22:12 ` Chris Ball
2011-05-26 1:24 ` Chris Ball
1 sibling, 0 replies; 6+ messages in thread
From: Chris Ball @ 2011-05-12 22:12 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Magnus Damm, Simon Horman, Ian Molton
Hi Guennadi,
On Thu, May 12 2011, Guennadi Liakhovetski wrote:
>> > Please could you send a full patchset against mmc-next for tmio for .40?
>>
>> Can I also base my patches on next-2.6? I need both - latest mmc and pm,
>> so, using next would make it much easier.
>
> I rebased my stack on top of today's next, no changes were required, so,
> here's the order, I have the patches in my tree:
>
> https://patchwork.kernel.org/patch/711251/
> https://patchwork.kernel.org/patch/757602/
> https://patchwork.kernel.org/patch/757612/
> https://patchwork.kernel.org/patch/724081/
> https://patchwork.kernel.org/patch/761882/
> https://patchwork.kernel.org/patch/761902/
> https://patchwork.kernel.org/patch/761922/
> https://patchwork.kernel.org/patch/761942/
> https://patchwork.kernel.org/patch/777232/
> https://patchwork.kernel.org/patch/777262/
>
> As long as we manage to get these in 2.6.40 merge window early enough,
> we'll be able to push related arch patches via shmobile trees.
Thanks, all looks good to me -- pushed to mmc-next, and I'll try to
merge early in .40.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: tmio: fix PM in DMA mode
2011-05-12 10:19 ` Guennadi Liakhovetski
2011-05-12 22:12 ` Chris Ball
@ 2011-05-26 1:24 ` Chris Ball
1 sibling, 0 replies; 6+ messages in thread
From: Chris Ball @ 2011-05-26 1:24 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: linux-sh, linux-mmc, Magnus Damm, Simon Horman, Ian Molton
Hi Guennadi,
On Thu, May 12, 2011 at 12:19:10PM +0200, Guennadi Liakhovetski wrote:
> As long as we manage to get these in 2.6.40 merge window early enough,
> we'll be able to push related arch patches via shmobile trees.
Linus has pulled the MMC merge now; fire away.
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-26 1:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 17:11 [PATCH] mmc: tmio: fix PM in DMA mode Guennadi Liakhovetski
2011-05-11 1:20 ` Chris Ball
2011-05-12 8:17 ` Guennadi Liakhovetski
2011-05-12 10:19 ` Guennadi Liakhovetski
2011-05-12 22:12 ` Chris Ball
2011-05-26 1:24 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).