From patchwork Mon Apr 11 08:38:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 8798741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EBDFCC0553 for ; Mon, 11 Apr 2016 08:51:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 232AC20220 for ; Mon, 11 Apr 2016 08:51:18 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 500F0201CD for ; Mon, 11 Apr 2016 08:51:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apXPp-0000NM-IU; Mon, 11 Apr 2016 08:41:49 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1apXNy-00061W-Fh for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2016 08:40:00 +0000 Received: by mail-wm0-x22f.google.com with SMTP id u206so94035933wme.1 for ; Mon, 11 Apr 2016 01:39:34 -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=h7wXz2z0BvMej6BNh0taYwJiVGSkeYu3PAOH+zSP6JI=; b=WPZojRTxgxhluqaJcWNzG9AWaCwnZHdfS/5r+lCBhOYZD9CBqn1sQ2nZnZrwjiESzh yValjDK7oCCOEmyLS7LH75oPVZDuU4ZlOh2MCG1MH0y2flzd+9cU2hONSkttDT6L1VDr ZTrMsBW3TUCTdLMLvD4ade3SkxBzKIlwdtwu4= 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=h7wXz2z0BvMej6BNh0taYwJiVGSkeYu3PAOH+zSP6JI=; b=JJ3mT3iENDvFVOgknJPX2m443KkGD6I6VavelXNQk1UqLUYIJ16dBpxNHHibUC4+Rw A63WJ5NrULzAPU0XzBH+jioZKUraCyVJWina5uZo9TRkfDG/gAcYgm+oHGBWcFSV76Ko Edp7JROkQq0mv3wi0YkzfPxBdhaK6TyvG+RMLndSstpmp6/Leyl1UOHMMHNSpvjbEoTW d3ZXUfxZ/w9j1CV4Kx4ARHbGrJmtYFJ8DJtj+2o4xOFDJoZf4LCqTsz6jnshuOPAVUk1 SFYw7YGFcvssAJyyDJjz5CBgGxrDhuOmGefKFLTwoGjPYEb91QBLVMQPdaLNy91HWymv 6LNg== X-Gm-Message-State: AD7BkJKQJE5Gv0a/QSX8+/eL0205BFw2trvCXrMTFVGnWsjp9fndRURSa387koRtAu6k809x X-Received: by 10.194.158.98 with SMTP id wt2mr22086914wjb.102.1460363973527; Mon, 11 Apr 2016 01:39:33 -0700 (PDT) Received: from mms734.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id d1sm16078604wmh.18.2016.04.11.01.39.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 01:39:33 -0700 (PDT) From: Stanimir Varbanov To: Rob Herring , Mark Rutland , Vinod Koul , Andy Gross Subject: [PATCH v3 6/6] dmaengine: qcom: bam_dma: rename BAM_MAX_DATA_SIZE define Date: Mon, 11 Apr 2016 11:38:43 +0300 Message-Id: <1460363923-16296-7-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460363923-16296-1-git-send-email-stanimir.varbanov@linaro.org> References: <1460363923-16296-1-git-send-email-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160411_013954_974511_25A32354 X-CRM114-Status: GOOD ( 13.98 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Archit Taneja , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Stanimir Varbanov , Sinan Kaya , dmaengine@vger.kernel.org, Pramod Gurav , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RDNS_NONE,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andy Gross --- drivers/dma/qcom/bam_dma.c | 16 ++++++++-------- 1 file 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[] = { #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;