Skip to content

Commit

Permalink
dmaengine: pl330: add support for interlace single xfer
Browse files Browse the repository at this point in the history
Change-Id: I953a3858c2cb3c252788bb65c27c99ee737744c9
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
  • Loading branch information
Sugar Zhang authored and ZhengShunQian committed Sep 26, 2018
1 parent 57c3f78 commit 9c50020
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/dma/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,12 @@ static inline int _setup_loops(struct pl330_dmac *pl330,
off += _emit_FLUSHP(dry_run, &buf[off],
pxs->desc->peri);
#endif
if (pxs->desc->rqtype == DMA_DEV_TO_MEM)
bursts = x->bytes / (BRST_SIZE(ccr) * BRST_LEN(ccr) +
pxs->desc->dst_interlace_size);
else if (pxs->desc->rqtype == DMA_MEM_TO_DEV)
bursts = x->bytes / (BRST_SIZE(ccr) * BRST_LEN(ccr) +
pxs->desc->src_interlace_size);
while (bursts) {
c = bursts;
off += _loop(pl330, dry_run, &buf[off], &c, pxs);
Expand All @@ -1501,7 +1507,9 @@ static inline int _setup_xfer(struct pl330_dmac *pl330,
/* Setup Loop(s) */
off += _setup_loops(pl330, dry_run, &buf[off], pxs);

if (pl330->peripherals_req_type == BURST) {
if (pxs->desc->src_interlace_size == 0 &&
pxs->desc->dst_interlace_size == 0 &&
pl330->peripherals_req_type == BURST) {
unsigned int ccr = pxs->ccr;
unsigned long c = 0;

Expand Down

0 comments on commit 9c50020

Please sign in to comment.