Commit Graph

9 Commits (6f69a1815a93722b360a1439934856e766509002)

Author SHA1 Message Date
Jassi Brar 336b1a3181 ARM: S3C64XX: DMA: Free node for non-circular queues
We need to free the buff and lli nodes if the buffer queue is
not CIRCULAR.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-11-09 23:51:19 +00:00
Jassi Brar 9b08284bf2 ARM: S3C64XX: DMA: Callback with correct buffer pointer
buffdone callback should be called per buffer request with pointer
to the latest serviced request.
'next' should point to the one next to currently active.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-11-09 23:51:03 +00:00
Jassi Brar 7507f39c57 ARM: S3C64XX: DMA: Make src and dst transfer size same
Some devices don't seem to work if the source and desitnation transfer
widths are not same. For example, SPI dma xfers, with 8bits/word,
don't work without this patch.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-11-09 23:50:42 +00:00
Jassi Brar 6d0b8627d5 ARM: S3C64XX: DMA: Unify callback functions for success/failure
Replace s3c64xx_dma_tcirq and s3c64xx_dma_errirq with the common
s3c64xx_dma_buffdone.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-11-09 23:50:39 +00:00
Jassi Brar 210012a6cd ARM: S3C64XX: DMA: Protect buffer pointers while manipulation
Ensure the DMA buffer points are not updated from
another source during the process of enquing a buffer.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
[ben-linux@fluff.org: Updated patch comment]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-11-09 23:50:39 +00:00
Jassi b93011e72c ARM: S3C64XX: DMA: Debugged alloc's with GFP_KERNEL flag in Intr context.
s3c2410_dma_enqueue makes call to kzalloc and dma_pool_alloc with GFP_KERNEL
flag set, this can be an issue for drivers, like I2S, which call
s3c2410_dma_enqueue from dma-bufferdone callback.

Change the flag GFP_KERNEL to GFP_ATOMIC to avoid any problems.

Signed-Off-by: Jassi <jassi.brar@samsung.com>
[ben-linux@fluff.org: Minor description edit and re-wrap]

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-09-16 00:50:06 +01:00
Jassi 3ea61e4922 ARM: S3C64XX: DMA: 'size' argument of dma_pool_create
Provide actual minimum(struct pl080s_lli) size of block to
dma_pool_create call, instead of hardcoded 32 bytes.

Signed-Off-by: Jassi <jassi.brar@samsung.com>

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-09-16 00:50:06 +01:00
Mark Brown 0b13406a1f [ARM] S3C64XX: Lower severity of DMA logging
The message was missing a severity macro so pick pr_debug().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:29:24 +01:00
Ben Dooks fa7a7883fe [ARM] S3C64XX: DMA support
Add support for the DMA blocks in the S3C64XX series of CPUS,
which are based on the ARM PL080 PrimeCell system.

Unfortunately, these DMA controllers diverge from the PL080
design by adding another DMA controller register and
configuration for OneNAND.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-18 16:29:21 +01:00