From patchwork Tue Apr 5 22:56:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 65147 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp730931lbc; Tue, 5 Apr 2016 15:58:18 -0700 (PDT) X-Received: by 10.98.69.1 with SMTP id s1mr33959085pfa.56.1459897097752; Tue, 05 Apr 2016 15:58:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ot4si10441257pab.169.2016.04.05.15.58.17; Tue, 05 Apr 2016 15:58:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760201AbcDEW5f (ORCPT + 7 others); Tue, 5 Apr 2016 18:57:35 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:34544 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760184AbcDEW5d (ORCPT ); Tue, 5 Apr 2016 18:57:33 -0400 Received: by mail-wm0-f43.google.com with SMTP id l6so42121486wml.1 for ; Tue, 05 Apr 2016 15:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YwaHrdwV7emgr8n/8mI3NvBw7b8eBjjX9nrfsYbx0sQ=; b=MYcF+JMuKAJSjiHn/NQgZkUb+TSIGAuHswBaSXnNnLawmYyv525c79tL1I0z6+FXiK cVZVF25K21vBhNFZJ87NSq9vcmv/nq5Gn6l3nWGuJyvB5CiyzOpimDrIkEhoTW+a1Na5 Sf7uvKj5nUDFimXdUKWIE2zDnGmLNYmTQRFl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YwaHrdwV7emgr8n/8mI3NvBw7b8eBjjX9nrfsYbx0sQ=; b=ZZy948/1KaxPWgcZlw5Taf+B+XVDTQFLdprGi8JwTqwxiEpviWLPEegGYbhp3sZIMm JgsBacVgL29WH0KovdFJ6t1/pVA8LdiXjXZ8rf8WCt8VMf/2/7LBJJ3UKlAifKx7Pcj8 n+bnxjXY3J8VWkh4cQBmmSCCGfRzuGALWBl1tDtsMOulhjKlTNwkYL5/2BIIo/KzRMC6 vcsBtVOLDn0WQkWsYIzDYDnyXarIAju3Qh9BsICsECTSmkCjF3LGKL5zGabg2C+bJjtM TnjSYn0QIQCge7PVbUolzP/GsiLodEiJlYwS7cBD55AwmG22z3b7ZNd2xtrSz5K1fs4w 9aQA== X-Gm-Message-State: AD7BkJIruj0guZ3SNERPTQ5e2Em6fsX/stcY0cVCImtjugpaPQ2XDgbFESqEsHOdHk1P7dDa X-Received: by 10.194.188.20 with SMTP id fw20mr27841519wjc.80.1459897051564; Tue, 05 Apr 2016 15:57:31 -0700 (PDT) Received: from localhost.localdomain (hst-221-11.medicom.bg. [84.238.221.11]) by smtp.gmail.com with ESMTPSA id n3sm21914wja.6.2016.04.05.15.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Apr 2016 15:57:31 -0700 (PDT) From: Stanimir Varbanov To: Rob Herring , Mark Rutland , Vinod Koul , Andy Gross Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, Sinan Kaya , Pramod Gurav , Stanimir Varbanov Subject: [PATCH v2 5/5] dmaengine: qcom: bam_dma: rename BAM_MAX_DATA_SIZE define Date: Wed, 6 Apr 2016 01:56:22 +0300 Message-Id: <1459896982-30171-6-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459896982-30171-1-git-send-email-stanimir.varbanov@linaro.org> References: <1459896982-30171-1-git-send-email-stanimir.varbanov@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- drivers/dma/qcom/bam_dma.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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[] = { #define BAM_DESC_FIFO_SIZE SZ_32K #define MAX_DESCRIPTORS (BAM_DESC_FIFO_SIZE / sizeof(struct bam_desc_hw) - 1) -#define BAM_MAX_DATA_SIZE (SZ_32K - 8) +#define BAM_FIFO_SIZE (SZ_32K - 8) struct bam_chan { struct virt_dma_chan vc; @@ -459,7 +459,7 @@ static void bam_chan_init_hw(struct bam_chan *bchan, */ writel_relaxed(ALIGN(bchan->fifo_phys, sizeof(struct bam_desc_hw)), bam_addr(bdev, bchan->id, BAM_P_DESC_FIFO_ADDR)); - writel_relaxed(BAM_MAX_DATA_SIZE, + writel_relaxed(BAM_FIFO_SIZE, bam_addr(bdev, bchan->id, BAM_P_FIFO_SIZES)); /* 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, /* calculate number of required entries */ for_each_sg(sgl, sg, sg_len, i) - num_alloc += DIV_ROUND_UP(sg_dma_len(sg), BAM_MAX_DATA_SIZE); + num_alloc += DIV_ROUND_UP(sg_dma_len(sg), BAM_FIFO_SIZE); /* allocate enough room to accomodate the number of entries */ async_desc = kzalloc(sizeof(*async_desc) + @@ -636,10 +636,10 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan, desc->addr = cpu_to_le32(sg_dma_address(sg) + curr_offset); - if (remainder > BAM_MAX_DATA_SIZE) { - desc->size = cpu_to_le16(BAM_MAX_DATA_SIZE); - remainder -= BAM_MAX_DATA_SIZE; - curr_offset += BAM_MAX_DATA_SIZE; + if (remainder > BAM_FIFO_SIZE) { + desc->size = cpu_to_le16(BAM_FIFO_SIZE); + remainder -= BAM_FIFO_SIZE; + curr_offset += BAM_FIFO_SIZE; } else { desc->size = cpu_to_le16(remainder); remainder = 0; @@ -1174,7 +1174,7 @@ static int bam_dma_probe(struct platform_device *pdev) /* set max dma segment size */ bdev->common.dev = bdev->dev; bdev->common.dev->dma_parms = &bdev->dma_parms; - ret = dma_set_max_seg_size(bdev->common.dev, BAM_MAX_DATA_SIZE); + ret = dma_set_max_seg_size(bdev->common.dev, BAM_FIFO_SIZE); if (ret) { dev_err(bdev->dev, "cannot set maximum segment size\n"); goto err_bam_channel_exit;