aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40_ll.c
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2010-08-09 08:08:10 -0400
committerDan Williams <dan.j.williams@intel.com>2010-09-22 17:53:45 -0400
commit0246e77b4d374bb37aa08c3fcadad20012e85ea0 (patch)
tree62b59fda3aca474abdec3c2385dc3fd00278ef34 /drivers/dma/ste_dma40_ll.c
parentb55912c66a317d9aaf4749488ca43d510c8a8a87 (diff)
DMAENGINE: ste_dma40: fix bug related to callback handling
The callback got called even when it was not supposed to. Also removed some not needed interrupt trigger on/off code. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40_ll.c')
-rw-r--r--drivers/dma/ste_dma40_ll.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/dma/ste_dma40_ll.c b/drivers/dma/ste_dma40_ll.c
index d937f76d6e2e..67076726b874 100644
--- a/drivers/dma/ste_dma40_ll.c
+++ b/drivers/dma/ste_dma40_ll.c
@@ -197,8 +197,7 @@ int d40_phy_sg_to_lli(struct scatterlist *sg,
197 dma_addr_t lli_phys, 197 dma_addr_t lli_phys,
198 u32 reg_cfg, 198 u32 reg_cfg,
199 u32 data_width, 199 u32 data_width,
200 int psize, 200 int psize)
201 bool term_int)
202{ 201{
203 int total_size = 0; 202 int total_size = 0;
204 int i; 203 int i;
@@ -309,7 +308,7 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla,
309 u32 src_data_width, 308 u32 src_data_width,
310 u32 dst_data_width, 309 u32 dst_data_width,
311 enum dma_data_direction direction, 310 enum dma_data_direction direction,
312 bool term_int, dma_addr_t dev_addr, int max_len, 311 dma_addr_t dev_addr, int max_len,
313 int llis_per_log) 312 int llis_per_log)
314{ 313{
315 int total_size = 0; 314 int total_size = 0;
@@ -356,7 +355,7 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla,
356 next_lli_off_dst, 355 next_lli_off_dst,
357 lcsp->lcsp3, dst_data_width, 356 lcsp->lcsp3, dst_data_width,
358 /* No next == terminal interrupt */ 357 /* No next == terminal interrupt */
359 term_int && !next_lli_off_dst, 358 !next_lli_off_dst,
360 false); 359 false);
361 } else { 360 } else {
362 d40_log_fill_lli(&lli->dst[i], 361 d40_log_fill_lli(&lli->dst[i],
@@ -365,7 +364,7 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla,
365 next_lli_off_dst, 364 next_lli_off_dst,
366 lcsp->lcsp3, dst_data_width, 365 lcsp->lcsp3, dst_data_width,
367 /* No next == terminal interrupt */ 366 /* No next == terminal interrupt */
368 term_int && !next_lli_off_dst, 367 !next_lli_off_dst,
369 true); 368 true);
370 d40_log_fill_lli(&lli->src[i], 369 d40_log_fill_lli(&lli->src[i],
371 dev_addr, 370 dev_addr,
@@ -385,7 +384,7 @@ int d40_log_sg_to_lli(int lcla_id,
385 struct d40_log_lli *lli_sg, 384 struct d40_log_lli *lli_sg,
386 u32 lcsp13, /* src or dst*/ 385 u32 lcsp13, /* src or dst*/
387 u32 data_width, 386 u32 data_width,
388 bool term_int, int max_len, int llis_per_log) 387 int max_len, int llis_per_log)
389{ 388{
390 int total_size = 0; 389 int total_size = 0;
391 struct scatterlist *current_sg = sg; 390 struct scatterlist *current_sg = sg;
@@ -414,7 +413,7 @@ int d40_log_sg_to_lli(int lcla_id,
414 sg_dma_len(current_sg), 413 sg_dma_len(current_sg),
415 next_lli_off, 414 next_lli_off,
416 lcsp13, data_width, 415 lcsp13, data_width,
417 term_int && !next_lli_off, 416 !next_lli_off,
418 true); 417 true);
419 } 418 }
420 return total_size; 419 return total_size;