diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-03-02 14:12:56 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-03-02 16:17:46 -0500 |
commit | 56a5d3cf21c71963c8fc506e9b9d3f71641d9c71 (patch) | |
tree | 3f793e6f9323fa4d34b71c2f1bb85e0497135207 /drivers/dma | |
parent | 516fd4305e5f5718475e81fe5c17c95888a8157b (diff) |
DMAENGINE: COH 901 318 lli sg offset fix
This makes the COH 901 318 respect the scatter offset field by using
the sg_phys() rather than the sg_dma_address() so we get a pointer
to the actual data we want to send rather than the beginning of the
buffer. Also initialize the lli:s a bit more thoroughly.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/coh901318_lli.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c index 5f9af1956ea..71d58c1a1e8 100644 --- a/drivers/dma/coh901318_lli.c +++ b/drivers/dma/coh901318_lli.c | |||
@@ -74,6 +74,8 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len) | |||
74 | 74 | ||
75 | lli = head; | 75 | lli = head; |
76 | lli->phy_this = phy; | 76 | lli->phy_this = phy; |
77 | lli->link_addr = 0x00000000; | ||
78 | lli->virt_link_addr = 0x00000000U; | ||
77 | 79 | ||
78 | for (i = 1; i < len; i++) { | 80 | for (i = 1; i < len; i++) { |
79 | lli_prev = lli; | 81 | lli_prev = lli; |
@@ -85,13 +87,13 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len) | |||
85 | 87 | ||
86 | DEBUGFS_POOL_COUNTER_ADD(pool, 1); | 88 | DEBUGFS_POOL_COUNTER_ADD(pool, 1); |
87 | lli->phy_this = phy; | 89 | lli->phy_this = phy; |
90 | lli->link_addr = 0x00000000; | ||
91 | lli->virt_link_addr = 0x00000000U; | ||
88 | 92 | ||
89 | lli_prev->link_addr = phy; | 93 | lli_prev->link_addr = phy; |
90 | lli_prev->virt_link_addr = lli; | 94 | lli_prev->virt_link_addr = lli; |
91 | } | 95 | } |
92 | 96 | ||
93 | lli->link_addr = 0x00000000U; | ||
94 | |||
95 | spin_unlock(&pool->lock); | 97 | spin_unlock(&pool->lock); |
96 | 98 | ||
97 | return head; | 99 | return head; |
@@ -268,10 +270,10 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool, | |||
268 | 270 | ||
269 | if (dir == DMA_TO_DEVICE) | 271 | if (dir == DMA_TO_DEVICE) |
270 | /* increment source address */ | 272 | /* increment source address */ |
271 | src = sg_dma_address(sg); | 273 | src = sg_phys(sg); |
272 | else | 274 | else |
273 | /* increment destination address */ | 275 | /* increment destination address */ |
274 | dst = sg_dma_address(sg); | 276 | dst = sg_phys(sg); |
275 | 277 | ||
276 | bytes_to_transfer = sg_dma_len(sg); | 278 | bytes_to_transfer = sg_dma_len(sg); |
277 | 279 | ||