ARM: S3C64XX: Stop and flush requests on freeing
Subsystems (3)
PATCH 3/3 ARM: S3C64XX: Stop and flush requests on freeing
When a DMA channel is freed, its pending requests should be flushed and the channel should be halted. This patch ensures that happens.
--- arch/arm/mach-s3c64xx/dma.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/dma.c +2 -1
@@ -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 ;
Signature · 1 line
1.7.0.4
PATCH 3/3 ARM: S3C64XX: Stop and flush requests on freeing
Quoted 13 lines · Maurus Cuelenaere
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 <[email protected]>---
?arch/arm/mach-s3c64xx/dma.c | ? ?3 ++-
?1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/mach-s3c64xx/dma.c +0
-0
arch/arm/mach-s3c64xx/dma.c int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) · line 564
Quoted 6 lines
arch/arm/mach-s3c64xx/dma.c +2
-1@@ -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.
PATCH 3/3 ARM: S3C64XX: Stop and flush requests on freeing
Quoted 18 lines · Jassi Brar
Quoted 16 lines · Maurus Cuelenaere
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 <[email protected]>---
?arch/arm/mach-s3c64xx/dma.c | ? ?3 ++-
?1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/mach-s3c64xx/dma.c +0
-0@@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) ? ? ? ? ? ? ? ? ? ? ? channel, chan->client, client); ? ? ? ?}
Quoted 5 lines
arch/arm/mach-s3c64xx/dma.c int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) · line 564
Quoted 3 lines
arch/arm/mach-s3c64xx/dma.c +2
-1- ? ? ? /* 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.
PATCH 3/3 ARM: S3C64XX: Stop and flush requests on freeing
Op 15-08-10 15:36, Jassi Brar schreef:
Quoted 19 lines · Jassi Brar
Quoted 18 lines
Quoted 16 lines · Maurus Cuelenaere
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 <[email protected]>--- arch/arm/mach-s3c64xx/dma.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)arch/arm/mach-s3c64xx/dma.c +0
-0@@ -560,7 +560,8 @@ int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) channel, chan->client, client); }
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-s3c64xx/dma.c int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) · line 564
Quoted 3 lines
arch/arm/mach-s3c64xx/dma.c +2
-1-/* 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.
Quoted 3 lines
Though it's a matter of S3C DMA API spec.
Shouldn't the client be made to explicitly doS3C2410_DMAOP_FLUSHa 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."
Signature · 1 line
Maurus Cuelenaere