Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172503
b: refs/heads/master
c: 4998f1a
h: refs/heads/master
i:
  172501: f97961c
  172499: 02a6f6c
  172495: 7ae2be2
v: v3
  • Loading branch information
Sascha Hauer committed Nov 24, 2009
1 parent 06c8bc8 commit 96e1e02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74b2a70e34c69687f82b1319a358b21afeea497c
refs/heads/master: 4998f1a30cf8e21c5bc0766fde4fa58e1adabd72
3 changes: 2 additions & 1 deletion trunk/arch/arm/plat-mxc/dma-mx1-mx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg)
}

now = min(imxdma->resbytes, sg->length);
imxdma->resbytes -= now;
if (imxdma->resbytes != IMX_DMA_LENGTH_LOOP)
imxdma->resbytes -= now;

if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ)
__raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel));
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ imx_dma_setup_single(int channel, dma_addr_t dma_address,
unsigned int dma_length, unsigned int dev_addr,
unsigned int dmamode);


/*
* Use this flag as the dma_length argument to imx_dma_setup_sg()
* to create an endless running dma loop. The end of the scatterlist
* must be linked to the beginning for this to work.
*/
#define IMX_DMA_LENGTH_LOOP ((unsigned int)-1)

int
imx_dma_setup_sg(int channel, struct scatterlist *sg,
unsigned int sgcount, unsigned int dma_length,
Expand Down

0 comments on commit 96e1e02

Please sign in to comment.