* [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing
@ 2010-08-15 13:08 Maurus Cuelenaere
2010-08-15 13:28 ` Jassi Brar
0 siblings, 1 reply; 5+ messages in thread
From: Maurus Cuelenaere @ 2010-08-15 13:08 UTC (permalink / raw)
To: linux-arm-kernel
When a DMA channel is freed, its pending requests should be flushed and the
channel should be halted. This patch ensures that happens.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
---
arch/arm/mach-s3c64xx/dma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index 1fd9d0c..e1f22af 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
channel, chan->client, client);
}
- /* sort out stopping and freeing the channel */
+ s3c64xx_dma_flush(chan);
+ s3c64xx_dma_stop(chan);
chan->client = NULL;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing
2010-08-15 13:08 [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing Maurus Cuelenaere
@ 2010-08-15 13:28 ` Jassi Brar
2010-08-15 13:36 ` Jassi Brar
0 siblings, 1 reply; 5+ messages in thread
From: Jassi Brar @ 2010-08-15 13:28 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 31, 2010 at 8:34 PM, Maurus Cuelenaere
<mcuelenaere@gmail.com> wrote:
> When a DMA channel is freed, its pending requests should be flushed and the
> channel should be halted. This patch ensures that happens.
>
> Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
> ---
> ?arch/arm/mach-s3c64xx/dma.c | ? ?3 ++-
> ?1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
> index 1fd9d0c..e1f22af 100644
> --- a/arch/arm/mach-s3c64xx/dma.c
> +++ b/arch/arm/mach-s3c64xx/dma.c
> @@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
> ? ? ? ? ? ? ? ? ? ? ? channel, chan->client, client);
> ? ? ? ?}
>
> - ? ? ? /* sort out stopping and freeing the channel */
> + ? ? ? s3c64xx_dma_flush(chan);
> + ? ? ? s3c64xx_dma_stop(chan);
I think, the order should be reverted.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing
2010-08-15 13:28 ` Jassi Brar
@ 2010-08-15 13:36 ` Jassi Brar
2010-08-15 13:42 ` Maurus Cuelenaere
0 siblings, 1 reply; 5+ messages in thread
From: Jassi Brar @ 2010-08-15 13:36 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Aug 15, 2010 at 10:28 PM, Jassi Brar <jassisinghbrar@gmail.com> wrote:
> On Mon, May 31, 2010 at 8:34 PM, Maurus Cuelenaere
> <mcuelenaere@gmail.com> wrote:
>> When a DMA channel is freed, its pending requests should be flushed and the
>> channel should be halted. This patch ensures that happens.
>>
>> Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
>> ---
>> ?arch/arm/mach-s3c64xx/dma.c | ? ?3 ++-
>> ?1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
>> index 1fd9d0c..e1f22af 100644
>> --- a/arch/arm/mach-s3c64xx/dma.c
>> +++ b/arch/arm/mach-s3c64xx/dma.c
>> @@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
>> ? ? ? ? ? ? ? ? ? ? ? channel, chan->client, client);
>> ? ? ? ?}
>>
>> - ? ? ? /* sort out stopping and freeing the channel */
>> + ? ? ? s3c64xx_dma_flush(chan);
>> + ? ? ? s3c64xx_dma_stop(chan);
>
> I think, the order should be reverted.
Though it's a matter of S3C DMA API spec.
Shouldn't the client be made to explicitly do S3C2410_DMAOP_FLUSH
a pending req before freeing the channel? If so, the patch may not be needed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing
2010-08-15 13:36 ` Jassi Brar
@ 2010-08-15 13:42 ` Maurus Cuelenaere
0 siblings, 0 replies; 5+ messages in thread
From: Maurus Cuelenaere @ 2010-08-15 13:42 UTC (permalink / raw)
To: linux-arm-kernel
Op 15-08-10 15:36, Jassi Brar schreef:
> On Sun, Aug 15, 2010 at 10:28 PM, Jassi Brar <jassisinghbrar@gmail.com> wrote:
>> On Mon, May 31, 2010 at 8:34 PM, Maurus Cuelenaere
>> <mcuelenaere@gmail.com> wrote:
>>> When a DMA channel is freed, its pending requests should be flushed and the
>>> channel should be halted. This patch ensures that happens.
>>>
>>> Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
>>> ---
>>> arch/arm/mach-s3c64xx/dma.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
>>> index 1fd9d0c..e1f22af 100644
>>> --- a/arch/arm/mach-s3c64xx/dma.c
>>> +++ b/arch/arm/mach-s3c64xx/dma.c
>>> @@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
>>> channel, chan->client, client);
>>> }
>>>
>>> - /* sort out stopping and freeing the channel */
>>> + s3c64xx_dma_flush(chan);
>>> + s3c64xx_dma_stop(chan);
>> I think, the order should be reverted.
You're probably right.
> Though it's a matter of S3C DMA API spec.
> Shouldn't the client be made to explicitly do S3C2410_DMAOP_FLUSH
> a pending req before freeing the channel? If so, the patch may not be needed.
I can't find anything about the client needing to flush the request itself.
Documentation/arm/Samsung-S3C24XX/DMA.txt doesn't mention anything regarding it
and the comment above s3c2410_dma_free() says "release the given channel back to
the system, will stop and flush any outstanding transfers, and ensure the
channel is ready for the next claimant."
--
Maurus Cuelenaere
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <cover.1275306279.git.mcuelenaere@gmail.com>]
* [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing
[not found] <cover.1275306279.git.mcuelenaere@gmail.com>
@ 2010-05-31 11:58 ` Maurus Cuelenaere
0 siblings, 0 replies; 5+ messages in thread
From: Maurus Cuelenaere @ 2010-05-31 11:58 UTC (permalink / raw)
To: linux-arm-kernel
When a DMA channel is freed, its pending requests should be flushed and the
channel should be halted. This patch ensures that happens.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
---
arch/arm/mach-s3c64xx/dma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index 8c9946f..193b07f 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
channel, chan->client, client);
}
- /* sort out stopping and freeing the channel */
+ s3c64xx_dma_flush(chan);
+ s3c64xx_dma_stop(chan);
chan->client = NULL;
chan->in_use = 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-15 13:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-15 13:08 [PATCH 3/3] ARM: S3C64XX: Stop and flush requests on freeing Maurus Cuelenaere
2010-08-15 13:28 ` Jassi Brar
2010-08-15 13:36 ` Jassi Brar
2010-08-15 13:42 ` Maurus Cuelenaere
[not found] <cover.1275306279.git.mcuelenaere@gmail.com>
2010-05-31 11:58 ` Maurus Cuelenaere
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).