From patchwork Tue Apr 9 18:39:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16004 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 91094277CA for ; Tue, 9 Apr 2013 18:40:16 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r11sf10008440ghr.5 for ; Tue, 09 Apr 2013 11:39:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=RHfskmg2EsFjnOLhQ4hh7p4+KLc2vLr5oFxASyidJBc=; b=XZYnAJoTSJ3s4NuWbVxRhHObFoDRYOE+DT6nHH6zST/vXQ+OgbugGy/oQ1WzFRWTDy psloTLIvwrk9zj6X39gLe8Ag/ck1Ut21OE6TaIZPWOTffSnTlknUniecyPGW0rY2angB tnQ1aCRC3UsaVr7EXrxN4ZX1qz7cm88UiCzLUmSfrWJQR1vxsXl9iGpJM6lhLZXYVjxm sU0OOoyK4UyHEzvoTB0+S58iAG9mZv73P6k+nBuqJzFlDZSl2YvIG3ugW1yTpJMZJTx8 jxJHQDUKGHfGuaT4Qd9jpNbn2sBL3uhuCFy+rrTifujq3xlCqXTeOg+ZoseZQIeEzx3i 8HUA== X-Received: by 10.236.115.170 with SMTP id e30mr10286243yhh.7.1365532799284; Tue, 09 Apr 2013 11:39:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.130.100 with SMTP id od4ls1065196qeb.27.gmail; Tue, 09 Apr 2013 11:39:59 -0700 (PDT) X-Received: by 10.52.26.209 with SMTP id n17mr148240vdg.26.1365532799099; Tue, 09 Apr 2013 11:39:59 -0700 (PDT) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [2607:f8b0:400c:c02::231]) by mx.google.com with ESMTPS id cs9si5460271vdc.103.2013.04.09.11.39.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 11:39:59 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::231; Received: by mail-vb0-f49.google.com with SMTP id 11so4929619vbf.8 for ; Tue, 09 Apr 2013 11:39:59 -0700 (PDT) X-Received: by 10.58.168.208 with SMTP id zy16mr20404937veb.3.1365532798895; Tue, 09 Apr 2013 11:39:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp75253vez; Tue, 9 Apr 2013 11:39:58 -0700 (PDT) X-Received: by 10.194.171.74 with SMTP id as10mr40527955wjc.0.1365532797754; Tue, 09 Apr 2013 11:39:57 -0700 (PDT) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [2a00:1450:400c:c03::232]) by mx.google.com with ESMTPS id fz4si4025795wjb.249.2013.04.09.11.39.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 11:39:57 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::232 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::232; Received: by mail-we0-f178.google.com with SMTP id z53so5587434wey.37 for ; Tue, 09 Apr 2013 11:39:57 -0700 (PDT) X-Received: by 10.180.149.227 with SMTP id ud3mr26765409wib.0.1365532797356; Tue, 09 Apr 2013 11:39:57 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id g9sm30684863wix.1.2013.04.09.11.39.54 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 11:39:56 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones , Vinod Koul , Dan Williams , Per Forlin Subject: [PATCH 4/8] dmaengine: ste_dma40: Do not configure channels during an channel allocation Date: Tue, 9 Apr 2013 19:39:39 +0100 Message-Id: <1365532783-27425-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365532783-27425-1-git-send-email-lee.jones@linaro.org> References: <1365532783-27425-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkw62Z2sa4pVWksS+7A4lgvE9gXDogC528gPZ8uY6ZLsxpG/o5kId7ek3o0STB/wrFxgRVD X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , According to the DMA documentation allocating a channel and configuring it are two separate actions. By removing the configuration code from the channel allocation path we lighten the burden on the information required to successfully allocate a channel. Cc: Vinod Koul Cc: Dan Williams Cc: Per Forlin Acked-by: Arnd Bergmann Signed-off-by: Lee Jones --- drivers/dma/ste_dma40.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 2a0a9d4..9e423ad 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2463,16 +2463,10 @@ static int d40_alloc_chan_resources(struct dma_chan *chan) } pm_runtime_get_sync(d40c->base->dev); - /* Fill in basic CFG register values */ - d40_phy_cfg(&d40c->dma_cfg, &d40c->src_def_cfg, - &d40c->dst_def_cfg, chan_is_logical(d40c)); d40_set_prio_realtime(d40c); if (chan_is_logical(d40c)) { - d40_log_cfg(&d40c->dma_cfg, - &d40c->log_def.lcsp1, &d40c->log_def.lcsp3); - if (d40c->dma_cfg.dir == STEDMA40_PERIPH_TO_MEM) d40c->lcpa = d40c->base->lcpa_base + d40c->dma_cfg.src_dev_type * D40_LCPA_CHAN_SIZE; @@ -2487,14 +2481,6 @@ static int d40_alloc_chan_resources(struct dma_chan *chan) d40c->phy_chan->num, d40c->dma_cfg.use_fixed_channel ? ", fixed" : ""); - - /* - * Only write channel configuration to the DMA if the physical - * resource is free. In case of multiple logical channels - * on the same physical resource, only the first write is necessary. - */ - if (is_free_phy) - d40_config_write(d40c); fail: pm_runtime_mark_last_busy(d40c->base->dev); pm_runtime_put_autosuspend(d40c->base->dev);