Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions drivers/dma/at_hdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@
#define ATC_DPIP_HOLE GENMASK(15, 0)
#define ATC_DPIP_BOUNDARY GENMASK(25, 16)

#define ATC_SRC_PER_ID(id) (FIELD_PREP(ATC_SRC_PER_MSB, (id)) | \
#define ATC_SRC_PER_ID(id) (FIELD_PREP(ATC_SRC_PER_MSB, ATC_PER_MSB(id)) | \
FIELD_PREP(ATC_SRC_PER, (id)))
#define ATC_DST_PER_ID(id) (FIELD_PREP(ATC_DST_PER_MSB, (id)) | \
#define ATC_DST_PER_ID(id) (FIELD_PREP(ATC_DST_PER_MSB, ATC_PER_MSB(id)) | \
FIELD_PREP(ATC_DST_PER, (id)))


Expand Down Expand Up @@ -1008,7 +1008,7 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
lli->ctrla = ctrla | xfer_count;
lli->ctrlb = ctrlb;

desc->sg[i].len = xfer_count << src_width;
atdma_sg->len = xfer_count << src_width;

atdma_lli_chain(desc, i);
}
Expand Down Expand Up @@ -1306,7 +1306,6 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
atdma_sg->len = len;
total_len += len;

desc->sg[i].len = len;
atdma_lli_chain(desc, i);
}
break;
Expand Down Expand Up @@ -1352,7 +1351,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
len >> reg_width;
lli->ctrlb = ctrlb;

desc->sg[i].len = len;
atdma_sg->len = len;
total_len += len;

atdma_lli_chain(desc, i);
Expand Down Expand Up @@ -1453,7 +1452,7 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc,
FIELD_PREP(ATC_DST_WIDTH, reg_width) |
FIELD_PREP(ATC_SRC_WIDTH, reg_width) |
period_len >> reg_width;
desc->sg[i].len = period_len;
atdma_sg->len = period_len;

return 0;
}
Expand Down