diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2016-04-11 04:38:43 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-04-19 11:41:32 -0400 |
commit | 5ad3f29f6a712c3a37dbda4fba3b6969857d39d9 (patch) | |
tree | 3fc18b4cb6acd9fb325ea212d3ac8a768e23d340 | |
parent | 2a663ed9fe88cb237d72ce869aeadbbf119ad8e4 (diff) |
dmaengine: qcom: bam_dma: rename BAM_MAX_DATA_SIZE define
It seems that the define has not been with acurate name and
makes confusion while reading the code. The more acurate
name should be BAM_FIFO_SIZE.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/qcom/bam_dma.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 7e5ad1c25e21..969b48176745 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c | |||
@@ -342,7 +342,7 @@ static const struct reg_offset_data bam_v1_7_reg_info[] = { | |||
342 | 342 | ||
343 | #define BAM_DESC_FIFO_SIZE SZ_32K | 343 | #define BAM_DESC_FIFO_SIZE SZ_32K |
344 | #define MAX_DESCRIPTORS (BAM_DESC_FIFO_SIZE / sizeof(struct bam_desc_hw) - 1) | 344 | #define MAX_DESCRIPTORS (BAM_DESC_FIFO_SIZE / sizeof(struct bam_desc_hw) - 1) |
345 | #define BAM_MAX_DATA_SIZE (SZ_32K - 8) | 345 | #define BAM_FIFO_SIZE (SZ_32K - 8) |
346 | 346 | ||
347 | struct bam_chan { | 347 | struct bam_chan { |
348 | struct virt_dma_chan vc; | 348 | struct virt_dma_chan vc; |
@@ -459,7 +459,7 @@ static void bam_chan_init_hw(struct bam_chan *bchan, | |||
459 | */ | 459 | */ |
460 | writel_relaxed(ALIGN(bchan->fifo_phys, sizeof(struct bam_desc_hw)), | 460 | writel_relaxed(ALIGN(bchan->fifo_phys, sizeof(struct bam_desc_hw)), |
461 | bam_addr(bdev, bchan->id, BAM_P_DESC_FIFO_ADDR)); | 461 | bam_addr(bdev, bchan->id, BAM_P_DESC_FIFO_ADDR)); |
462 | writel_relaxed(BAM_MAX_DATA_SIZE, | 462 | writel_relaxed(BAM_FIFO_SIZE, |
463 | bam_addr(bdev, bchan->id, BAM_P_FIFO_SIZES)); | 463 | bam_addr(bdev, bchan->id, BAM_P_FIFO_SIZES)); |
464 | 464 | ||
465 | /* enable the per pipe interrupts, enable EOT, ERR, and INT irqs */ | 465 | /* enable the per pipe interrupts, enable EOT, ERR, and INT irqs */ |
@@ -605,7 +605,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan, | |||
605 | 605 | ||
606 | /* calculate number of required entries */ | 606 | /* calculate number of required entries */ |
607 | for_each_sg(sgl, sg, sg_len, i) | 607 | for_each_sg(sgl, sg, sg_len, i) |
608 | num_alloc += DIV_ROUND_UP(sg_dma_len(sg), BAM_MAX_DATA_SIZE); | 608 | num_alloc += DIV_ROUND_UP(sg_dma_len(sg), BAM_FIFO_SIZE); |
609 | 609 | ||
610 | /* allocate enough room to accomodate the number of entries */ | 610 | /* allocate enough room to accomodate the number of entries */ |
611 | async_desc = kzalloc(sizeof(*async_desc) + | 611 | async_desc = kzalloc(sizeof(*async_desc) + |
@@ -636,10 +636,10 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan, | |||
636 | desc->addr = cpu_to_le32(sg_dma_address(sg) + | 636 | desc->addr = cpu_to_le32(sg_dma_address(sg) + |
637 | curr_offset); | 637 | curr_offset); |
638 | 638 | ||
639 | if (remainder > BAM_MAX_DATA_SIZE) { | 639 | if (remainder > BAM_FIFO_SIZE) { |
640 | desc->size = cpu_to_le16(BAM_MAX_DATA_SIZE); | 640 | desc->size = cpu_to_le16(BAM_FIFO_SIZE); |
641 | remainder -= BAM_MAX_DATA_SIZE; | 641 | remainder -= BAM_FIFO_SIZE; |
642 | curr_offset += BAM_MAX_DATA_SIZE; | 642 | curr_offset += BAM_FIFO_SIZE; |
643 | } else { | 643 | } else { |
644 | desc->size = cpu_to_le16(remainder); | 644 | desc->size = cpu_to_le16(remainder); |
645 | remainder = 0; | 645 | remainder = 0; |
@@ -1174,7 +1174,7 @@ static int bam_dma_probe(struct platform_device *pdev) | |||
1174 | /* set max dma segment size */ | 1174 | /* set max dma segment size */ |
1175 | bdev->common.dev = bdev->dev; | 1175 | bdev->common.dev = bdev->dev; |
1176 | bdev->common.dev->dma_parms = &bdev->dma_parms; | 1176 | bdev->common.dev->dma_parms = &bdev->dma_parms; |
1177 | ret = dma_set_max_seg_size(bdev->common.dev, BAM_MAX_DATA_SIZE); | 1177 | ret = dma_set_max_seg_size(bdev->common.dev, BAM_FIFO_SIZE); |
1178 | if (ret) { | 1178 | if (ret) { |
1179 | dev_err(bdev->dev, "cannot set maximum segment size\n"); | 1179 | dev_err(bdev->dev, "cannot set maximum segment size\n"); |
1180 | goto err_bam_channel_exit; | 1180 | goto err_bam_channel_exit; |