Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308055
b: refs/heads/master
c: fdaf9c4
h: refs/heads/master
i:
  308053: a64fd05
  308051: 14579df
  308047: cead081
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Vinod Koul committed May 11, 2012
1 parent b9be240 commit d28b3ed
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbb796ccd8c33c50249b876d9773dfa8e67d39cb
refs/heads/master: fdaf9c4b22247a6cc6cda9459be3e52764c14d95
2 changes: 1 addition & 1 deletion trunk/drivers/dma/amba-pl08x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_slave_sg(
int ret, tmp;

dev_dbg(&pl08x->adev->dev, "%s prepare transaction of %d bytes from %s\n",
__func__, sgl->length, plchan->name);
__func__, sg_dma_len(sgl), plchan->name);

txd = pl08x_get_txd(plchan, flags);
if (!txd) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/dma/coh901318.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,

if (!sgl)
goto out;
if (sgl->length == 0)
if (sg_dma_len(sgl) == 0)
goto out;

spin_lock_irqsave(&cohc->lock, flg);
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/dma/imx-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d)
struct scatterlist *sg = d->sg;
unsigned long now;

now = min(d->len, sg->length);
now = min(d->len, sg_dma_len(sg));
if (d->len != IMX_DMA_LENGTH_LOOP)
d->len -= now;

Expand Down Expand Up @@ -763,16 +763,16 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node);

for_each_sg(sgl, sg, sg_len, i) {
dma_length += sg->length;
dma_length += sg_dma_len(sg);
}

switch (imxdmac->word_size) {
case DMA_SLAVE_BUSWIDTH_4_BYTES:
if (sgl->length & 3 || sgl->dma_address & 3)
if (sg_dma_len(sgl) & 3 || sgl->dma_address & 3)
return NULL;
break;
case DMA_SLAVE_BUSWIDTH_2_BYTES:
if (sgl->length & 1 || sgl->dma_address & 1)
if (sg_dma_len(sgl) & 1 || sgl->dma_address & 1)
return NULL;
break;
case DMA_SLAVE_BUSWIDTH_1_BYTE:
Expand Down Expand Up @@ -831,13 +831,13 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
imxdmac->sg_list[i].page_link = 0;
imxdmac->sg_list[i].offset = 0;
imxdmac->sg_list[i].dma_address = dma_addr;
imxdmac->sg_list[i].length = period_len;
sg_dma_len(&imxdmac->sg_list[i]) = period_len;
dma_addr += period_len;
}

/* close the loop */
imxdmac->sg_list[periods].offset = 0;
imxdmac->sg_list[periods].length = 0;
sg_dma_len(&imxdmac->sg_list[periods]) = 0;
imxdmac->sg_list[periods].page_link =
((unsigned long)imxdmac->sg_list | 0x01) & ~0x02;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(

bd->buffer_addr = sg->dma_address;

count = sg->length;
count = sg_dma_len(sg);

if (count > 0xffff) {
dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n",
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/dma/intel_mid_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int midc_lli_fill_sg(struct intel_mid_dma_chan *midc,
}
}
/*Populate CTL_HI values*/
ctl_hi.ctlx.block_ts = get_block_ts(sg->length,
ctl_hi.ctlx.block_ts = get_block_ts(sg_dma_len(sg),
desc->width,
midc->dma->block_size);
/*Populate SAR and DAR values*/
Expand Down Expand Up @@ -747,7 +747,7 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_slave_sg(
txd = intel_mid_dma_prep_memcpy(chan,
mids->dma_slave.dst_addr,
mids->dma_slave.src_addr,
sgl->length,
sg_dma_len(sgl),
flags);
return txd;
} else {
Expand All @@ -759,7 +759,7 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_slave_sg(
pr_debug("MDMA: SG Length = %d, direction = %d, Flags = %#lx\n",
sg_len, direction, flags);

txd = intel_mid_dma_prep_memcpy(chan, 0, 0, sgl->length, flags);
txd = intel_mid_dma_prep_memcpy(chan, 0, 0, sg_dma_len(sgl), flags);
if (NULL == txd) {
pr_err("MDMA: Prep memcpy failed\n");
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/dma/mxs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,17 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
ccw->bits |= BF_CCW(MXS_DMA_CMD_NO_XFER, COMMAND);
} else {
for_each_sg(sgl, sg, sg_len, i) {
if (sg->length > MAX_XFER_BYTES) {
if (sg_dma_len(sg) > MAX_XFER_BYTES) {
dev_err(mxs_dma->dma_device.dev, "maximum bytes for sg entry exceeded: %d > %d\n",
sg->length, MAX_XFER_BYTES);
sg_dma_len(sg), MAX_XFER_BYTES);
goto err_out;
}

ccw = &mxs_chan->ccw[idx++];

ccw->next = mxs_chan->ccw_phys + sizeof(*ccw) * idx;
ccw->bufaddr = sg->dma_address;
ccw->xfer_bytes = sg->length;
ccw->xfer_bytes = sg_dma_len(sg);

ccw->bits = 0;
ccw->bits |= CCW_CHAIN;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,7 @@ dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
}

sg[periods].offset = 0;
sg[periods].length = 0;
sg_dma_len(&sg[periods]) = 0;
sg[periods].page_link =
((unsigned long)sg | 0x01) & ~0x02;

Expand Down

0 comments on commit d28b3ed

Please sign in to comment.