-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dmaengine: move drivers to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction, this patch moves dma/drivers/* to use new enum Cc: Jassi Brar <[email protected]> Cc: Russell King <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Nicolas Ferre <[email protected]> Cc: Mika Westerberg <[email protected]> Cc: H Hartley Sweeten <[email protected]> Cc: Li Yang <[email protected]> Cc: Zhang Wei <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Guennadi Liakhovetski <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Yong Wang <[email protected]> Cc: Tomoya MORINAGA <[email protected]> Cc: Boojin Kim <[email protected]> Cc: Barry Song <[email protected]> Acked-by: Mika Westerberg <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
- Loading branch information
Vinod Koul
committed
Oct 27, 2011
1 parent
49920bc
commit db8196d
Showing
25 changed files
with
150 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,10 @@ | |
* Author: Per Friden <[email protected]> | ||
*/ | ||
|
||
#include <linux/dma-mapping.h> | ||
#include <linux/spinlock.h> | ||
#include <linux/dmapool.h> | ||
#include <linux/memory.h> | ||
#include <linux/gfp.h> | ||
#include <linux/dmapool.h> | ||
#include <mach/coh901318.h> | ||
|
||
#include "coh901318_lli.h" | ||
|
@@ -177,18 +176,18 @@ coh901318_lli_fill_single(struct coh901318_pool *pool, | |
struct coh901318_lli *lli, | ||
dma_addr_t buf, unsigned int size, | ||
dma_addr_t dev_addr, u32 ctrl_chained, u32 ctrl_eom, | ||
enum dma_data_direction dir) | ||
enum dma_transfer_direction dir) | ||
{ | ||
int s = size; | ||
dma_addr_t src; | ||
dma_addr_t dst; | ||
|
||
|
||
if (dir == DMA_TO_DEVICE) { | ||
if (dir == DMA_MEM_TO_DEV) { | ||
src = buf; | ||
dst = dev_addr; | ||
|
||
} else if (dir == DMA_FROM_DEVICE) { | ||
} else if (dir == DMA_DEV_TO_MEM) { | ||
|
||
src = dev_addr; | ||
dst = buf; | ||
|
@@ -215,9 +214,9 @@ coh901318_lli_fill_single(struct coh901318_pool *pool, | |
|
||
lli = coh901318_lli_next(lli); | ||
|
||
if (dir == DMA_TO_DEVICE) | ||
if (dir == DMA_MEM_TO_DEV) | ||
src += block_size; | ||
else if (dir == DMA_FROM_DEVICE) | ||
else if (dir == DMA_DEV_TO_MEM) | ||
dst += block_size; | ||
} | ||
|
||
|
@@ -234,7 +233,7 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool, | |
struct scatterlist *sgl, unsigned int nents, | ||
dma_addr_t dev_addr, u32 ctrl_chained, u32 ctrl, | ||
u32 ctrl_last, | ||
enum dma_data_direction dir, u32 ctrl_irq_mask) | ||
enum dma_transfer_direction dir, u32 ctrl_irq_mask) | ||
{ | ||
int i; | ||
struct scatterlist *sg; | ||
|
@@ -249,9 +248,9 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool, | |
|
||
spin_lock(&pool->lock); | ||
|
||
if (dir == DMA_TO_DEVICE) | ||
if (dir == DMA_MEM_TO_DEV) | ||
dst = dev_addr; | ||
else if (dir == DMA_FROM_DEVICE) | ||
else if (dir == DMA_DEV_TO_MEM) | ||
src = dev_addr; | ||
else | ||
goto err; | ||
|
@@ -269,7 +268,7 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool, | |
ctrl_sg = ctrl ? ctrl : ctrl_last; | ||
|
||
|
||
if (dir == DMA_TO_DEVICE) | ||
if (dir == DMA_MEM_TO_DEV) | ||
/* increment source address */ | ||
src = sg_phys(sg); | ||
else | ||
|
@@ -293,7 +292,7 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool, | |
lli->src_addr = src; | ||
lli->dst_addr = dst; | ||
|
||
if (dir == DMA_FROM_DEVICE) | ||
if (dir == DMA_DEV_TO_MEM) | ||
dst += elem_size; | ||
else | ||
src += elem_size; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.