diff options
Diffstat (limited to 'drivers/dma/ste_dma40_ll.c')
-rw-r--r-- | drivers/dma/ste_dma40_ll.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/dma/ste_dma40_ll.c b/drivers/dma/ste_dma40_ll.c index 561fdd8a80c1..d937f76d6e2e 100644 --- a/drivers/dma/ste_dma40_ll.c +++ b/drivers/dma/ste_dma40_ll.c | |||
@@ -315,11 +315,8 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla, | |||
315 | int total_size = 0; | 315 | int total_size = 0; |
316 | struct scatterlist *current_sg = sg; | 316 | struct scatterlist *current_sg = sg; |
317 | int i; | 317 | int i; |
318 | u32 next_lli_off_dst; | 318 | u32 next_lli_off_dst = 0; |
319 | u32 next_lli_off_src; | 319 | u32 next_lli_off_src = 0; |
320 | |||
321 | next_lli_off_src = 0; | ||
322 | next_lli_off_dst = 0; | ||
323 | 320 | ||
324 | for_each_sg(sg, current_sg, sg_len, i) { | 321 | for_each_sg(sg, current_sg, sg_len, i) { |
325 | total_size += sg_dma_len(current_sg); | 322 | total_size += sg_dma_len(current_sg); |
@@ -351,7 +348,7 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla, | |||
351 | sg_dma_len(current_sg), | 348 | sg_dma_len(current_sg), |
352 | next_lli_off_src, | 349 | next_lli_off_src, |
353 | lcsp->lcsp1, src_data_width, | 350 | lcsp->lcsp1, src_data_width, |
354 | term_int && !next_lli_off_src, | 351 | false, |
355 | true); | 352 | true); |
356 | d40_log_fill_lli(&lli->dst[i], | 353 | d40_log_fill_lli(&lli->dst[i], |
357 | dev_addr, | 354 | dev_addr, |
@@ -375,7 +372,7 @@ int d40_log_sg_to_dev(struct d40_lcla_elem *lcla, | |||
375 | sg_dma_len(current_sg), | 372 | sg_dma_len(current_sg), |
376 | next_lli_off_src, | 373 | next_lli_off_src, |
377 | lcsp->lcsp1, src_data_width, | 374 | lcsp->lcsp1, src_data_width, |
378 | term_int && !next_lli_off_src, | 375 | false, |
379 | false); | 376 | false); |
380 | } | 377 | } |
381 | } | 378 | } |
@@ -423,32 +420,35 @@ int d40_log_sg_to_lli(int lcla_id, | |||
423 | return total_size; | 420 | return total_size; |
424 | } | 421 | } |
425 | 422 | ||
426 | void d40_log_lli_write(struct d40_log_lli_full *lcpa, | 423 | int d40_log_lli_write(struct d40_log_lli_full *lcpa, |
427 | struct d40_log_lli *lcla_src, | 424 | struct d40_log_lli *lcla_src, |
428 | struct d40_log_lli *lcla_dst, | 425 | struct d40_log_lli *lcla_dst, |
429 | struct d40_log_lli *lli_dst, | 426 | struct d40_log_lli *lli_dst, |
430 | struct d40_log_lli *lli_src, | 427 | struct d40_log_lli *lli_src, |
431 | int llis_per_log) | 428 | int llis_per_log) |
432 | { | 429 | { |
433 | u32 slos = 0; | 430 | u32 slos; |
434 | u32 dlos = 0; | 431 | u32 dlos; |
435 | int i; | 432 | int i; |
436 | 433 | ||
437 | lcpa->lcsp0 = lli_src->lcsp02; | 434 | writel(lli_src->lcsp02, &lcpa->lcsp0); |
438 | lcpa->lcsp1 = lli_src->lcsp13; | 435 | writel(lli_src->lcsp13, &lcpa->lcsp1); |
439 | lcpa->lcsp2 = lli_dst->lcsp02; | 436 | writel(lli_dst->lcsp02, &lcpa->lcsp2); |
440 | lcpa->lcsp3 = lli_dst->lcsp13; | 437 | writel(lli_dst->lcsp13, &lcpa->lcsp3); |
441 | 438 | ||
442 | slos = lli_src->lcsp13 & D40_MEM_LCSP1_SLOS_MASK; | 439 | slos = lli_src->lcsp13 & D40_MEM_LCSP1_SLOS_MASK; |
443 | dlos = lli_dst->lcsp13 & D40_MEM_LCSP3_DLOS_MASK; | 440 | dlos = lli_dst->lcsp13 & D40_MEM_LCSP3_DLOS_MASK; |
444 | 441 | ||
445 | for (i = 0; (i < llis_per_log) && slos && dlos; i++) { | 442 | for (i = 0; (i < llis_per_log) && slos && dlos; i++) { |
446 | writel(lli_src[i+1].lcsp02, &lcla_src[i].lcsp02); | 443 | writel(lli_src[i + 1].lcsp02, &lcla_src[i].lcsp02); |
447 | writel(lli_src[i+1].lcsp13, &lcla_src[i].lcsp13); | 444 | writel(lli_src[i + 1].lcsp13, &lcla_src[i].lcsp13); |
448 | writel(lli_dst[i+1].lcsp02, &lcla_dst[i].lcsp02); | 445 | writel(lli_dst[i + 1].lcsp02, &lcla_dst[i].lcsp02); |
449 | writel(lli_dst[i+1].lcsp13, &lcla_dst[i].lcsp13); | 446 | writel(lli_dst[i + 1].lcsp13, &lcla_dst[i].lcsp13); |
450 | 447 | ||
451 | slos = lli_src[i+1].lcsp13 & D40_MEM_LCSP1_SLOS_MASK; | 448 | slos = lli_src[i + 1].lcsp13 & D40_MEM_LCSP1_SLOS_MASK; |
452 | dlos = lli_dst[i+1].lcsp13 & D40_MEM_LCSP3_DLOS_MASK; | 449 | dlos = lli_dst[i + 1].lcsp13 & D40_MEM_LCSP3_DLOS_MASK; |
453 | } | 450 | } |
451 | |||
452 | return i; | ||
453 | |||
454 | } | 454 | } |