From patchwork Tue Sep 11 08:35:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146967 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386054ljw; Tue, 11 Sep 2018 01:36:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalWuleJRrsDA4vJTT7NIvmoy9m3maP7pZZumcSBdJC8Rc6X9pDrY8K+gf1PRwCAGr0VSzm X-Received: by 2002:a17:902:1a9:: with SMTP id b38-v6mr25894713plb.89.1536654986234; Tue, 11 Sep 2018 01:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654986; cv=none; d=google.com; s=arc-20160816; b=Hd5kn6Lz5nOFPBQEdSOlBpAQNEkzDX6EZq6ejh1TuCgc5ZhIxtnXpql47h+5vuvqWo 9k6KOH8XIYTlgV2seNDzPFEoo2PKpgFTgmQujrv483uhEKroMLoTUXUIl5qTfWibs1OA y5X+BLAmUCrb2LXgivDaMirgpwf3LDTxS2ZN35eV5xefM0FvzRXpkJ8MWst27GmkcNDn rP2oianeFO1ZE8qEyL88Z5sD/F+PvbqrOw3ikaxPCta5w2RnwKgTGQ5zrQ6/O08FKJpT a0YGUUUETH6D9L+yR8sfMU4xINkA9ZMzvwGUIfevBIPZSEwyugnjaoyYk6jObjeAsDtt Dlhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=QJBpSukcFNjQpRp0zXb/LhSFY04xwWKknnbV8unCffg=; b=D4qsExXBJxItq5AZVd9XORzNRNXvu7ObE9ROYXSlbM9+Cs2CysBv5bJ+ozTCW6DgpT blL3jDr1v9jc556uYd0F8wlUWkTnehRWfxRaI5e2Q5ov8ROwoHfNG3swcQ3WiwF+XoBZ ExshMuZtttsUitDbAJmIrQAI8LdS29cvkY129RYCNYOnTeaQN+0RkEKy8pIIf/0Svkez 3QFsF2gJguSMGEWKPJ9P4ku2wdRkLBlaeUnJXur9p3JMh3zAWfVQbMBwDtxJG3I0pt0w 17I1ACA8IvnIuArQ4CBOJBSPHTqV738saPj/Mi75msXgqwxNH21MMEcWo+1IWJ5N2FFL jyig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fY4euzwZ; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.26; Tue, 11 Sep 2018 01:36:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fY4euzwZ; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbeIKNej (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:52150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNej (ORCPT ); Tue, 11 Sep 2018 09:34:39 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D04A22086E; Tue, 11 Sep 2018 08:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654985; bh=VYO1dPNu+PynQthrcAInyDKH+FO9NPygZV/Vfne1s7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fY4euzwZ4e9yfQMviiod5eXVC+hGBKOb02NiHcyjtcOpTvYHCsJho2HkghC1acez/ 0GsJK3zLM36NPxJmL7LAemE3aMzJTtuj5mSQzSbz1X8aRmxVuBcdMFg31psqRkAUsc ysPk7itnSuepXko+VdFr3GUtA0XAgJeJx0C6/KCY= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Ludovic Desroches Subject: [PATCH 01/12] dmaengine: at_hdmac: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:25 +0530 Message-Id: <20180911083536.16482-2-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Ludovic Desroches drivers/dma/at_hdmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.4 diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 75f38d19fcbe..7cbac6e8c113 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1320,7 +1320,7 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, if (unlikely(!is_slave_direction(direction))) goto err_out; - if (sconfig->direction == DMA_MEM_TO_DEV) + if (direction == DMA_MEM_TO_DEV) reg_width = convert_buswidth(sconfig->dst_addr_width); else reg_width = convert_buswidth(sconfig->src_addr_width); From patchwork Tue Sep 11 08:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146949 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386103ljw; Tue, 11 Sep 2018 01:36:29 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaWByDmxITfLaOUbGdyPiZW+PPQCiVtoFKEDc8JqEoSvbYpcK1rOm+XAzce2ZeWAqgEyZtD X-Received: by 2002:a17:902:22e:: with SMTP id 43-v6mr26410765plc.118.1536654988940; Tue, 11 Sep 2018 01:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654988; cv=none; d=google.com; s=arc-20160816; b=p9Cja+vfGlmK6pgkc9Td23IGG33F8F+d6wXWwK+xX6C0nGSilMD72VDh6sPUNAOEV5 4McCmWUEKfUR404L6W377Z7LKq2N16vKxawxDanCEyV5uc4tC2/8jniFID8l7v06odZN AdhFZ1TEn/avP2dFhRLFkJUtcLf/L1ULIXuqDq1BUVDWe67Xl2YAAvqvhUbFIWkKfcvn SKG4nwMbcSP4ym7gERINosLwKOUgu9HOk7wMva3tPW/EDj9l8nAnIRaufc7bpPLH3UOd 24HHUDf4usyL4olqv4rEhUXANk2isWW5IjDDldI35Ar9PUthT4quK8/sBJAuYnxRwym6 qxKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=WDkc5GVdDUW4eCkomCAz/u08ngp6BF8IjPDWI1eBT7Y=; b=w3AimDbPPNCGW8CGtF2lZxHY7n2dEE+RkI2C6DFIX4kLrLj3Wu9XBbUAGX6Il7WRcC v0BgR6AFgTxAG+m2i4LbJqLPOrz1evPO1cKgypMY1wmeMUAw7Ifnplpvn+WSNXwOqMs1 MTPcLybxjlC2JWSFQMZndc42F69rXDcKetC1e8LOtJGChavyLFUCZcO5f1lRXhuqfIml RFTzR0o4VSVLggzMo/R2pwr/HiSEOVpKhAZJY+1SvBZYb/ubERcHDmQDoBxsnKxNBs8s NGvDGPsP299NHYt1l7yw6EcKRmYukT+2zj71zju0A8RDoJeF8bpXK7rCT+bdad/OBz/V /EWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1OXaG596; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.28; Tue, 11 Sep 2018 01:36:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1OXaG596; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726517AbeIKNem (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:52174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNem (ORCPT ); Tue, 11 Sep 2018 09:34:42 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 181A22086E; Tue, 11 Sep 2018 08:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654987; bh=H7/i6AZfjmiVIvAvKv6kptmRE51UO7Un1sNatdgCGj8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1OXaG5967s2XqRB08YGJCcjDe6Xew7XmBIP9Ly48uOsggiFBspR64Bw9W+sKKCkir 7+BTTEG5pvSTR7tJ1+AROMolYSzqoVov6HLGbaFbe/D89T+GOD5YP680kt7Lw0qdIh MzEe+gMQakuYdU+72Q3oUBE9nKnIc7tTrGgki06Q= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Ray Jui , Scott Branden Subject: [PATCH 02/12] dmaengine: bcm2835: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:26 +0530 Message-Id: <20180911083536.16482-3-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Ray Jui CC: Scott Branden drivers/dma/bcm2835-dma.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.14.4 Acked-by: Scott Branden diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 847f84a41a69..cad55ab80d41 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -778,14 +778,6 @@ static int bcm2835_dma_slave_config(struct dma_chan *chan, { struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); - if ((cfg->direction == DMA_DEV_TO_MEM && - cfg->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) || - (cfg->direction == DMA_MEM_TO_DEV && - cfg->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) || - !is_slave_direction(cfg->direction)) { - return -EINVAL; - } - c->cfg = *cfg; return 0; From patchwork Tue Sep 11 08:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146966 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386145ljw; Tue, 11 Sep 2018 01:36:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdauKlCpBO02xQpb2PNcppvQUYK5r7QKiQFsBz1Gzco9/n6nMyu41hIZxRnq6Y2gQMcuA1TU X-Received: by 2002:a65:654d:: with SMTP id a13-v6mr25017039pgw.35.1536654992413; Tue, 11 Sep 2018 01:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654992; cv=none; d=google.com; s=arc-20160816; b=T/KUsOcsrpBWLLam4Z/tTLDk+bCD2EQPwa87zjqeeXc/siXqraidbM6AxoB58tiqUa cFToP0XXb4HaQyXdXPfeJSS3qiXN2U18fr8VhIq1OMEuEYeTsXghbm6CcU7KcDPUE9i9 V2DxDrZIthQTUnMDojCk+/8oJLYNeWx/1MnZ8X8h/zK+ufb5X8GBTokJZ+2hvpkU4ngT mO5cbZu7KbvM6oV6s132+WVcoVgv9UmspKDb+lTafqqpB0ZjCs1l/fPbz851y3dSRryL HiqeYDNs+1hVgP9YUniRpPTYoOV0tbX8t74/rSoRsgB/rWusDN7ds9cKTs4nBjB2G0Fq M6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=pi0wNa38x56qFnaClHRDie34F02JLkmf8SmUpiqJnDk=; b=ZYmH9n9obAk57OM9ds4GxLU3HrC2wQYXH5OMlZmS8J2kYb9ruXfVkEmPsPDWG8oyBa TGHjYu6JCk9ITs0V0b5E6Kgdev29AeaaiW3smzxr+ctzz4TvyYvyV2aD0IhtXYW8R3Qi Pla/oXssNf+U6Bvpe36WcXUjYfpsMmHciq9HNzeeuY2SJq82c+OS4JBegBZfTBgZawo8 hiJK58yqSNlTIJod+byzfOMPEB83tTo+rs2oT5DkHXPpD3XuIQepT0sG5GSP6qMu/3nF F1FFSPq8ifkaja+IL+N0B+eHkUW02F42xrD3WqSLwXLwLgiFY7gbagnRABb7Dtpwy7xV X7yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="m2aK/coa"; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.32; Tue, 11 Sep 2018 01:36:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="m2aK/coa"; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726529AbeIKNeq (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:52198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNeq (ORCPT ); Tue, 11 Sep 2018 09:34:46 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A13772086E; Tue, 11 Sep 2018 08:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654991; bh=zYa91ZiJ4xME2+3qUM2uyt/jjY4OZ2rvHOU4G/TLMwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m2aK/coaAR2N/gNa94WELM3pE+i7IXcyywHzIk3R3qXNvfmquOtZZ47aPT5oOzQZa KOOGNQP1Vaa8cnR/a52ei2yDy6lCQhe0ESKm9w/vQdMI4dqPhy5wj6nd2wu8h1qnna flWsVZzFgvRwuCtJhez3aQx/CYcu33f7ImdaqKiw= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Eric Anholt , Linus Walleij Subject: [PATCH 03/12] dmaengine: coh901318: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:27 +0530 Message-Id: <20180911083536.16482-4-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Eric Anholt CC: Linus Walleij drivers/dma/coh901318.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) -- 2.14.4 diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index da74fd74636b..eebaba3d9e78 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -1306,6 +1306,7 @@ struct coh901318_chan { unsigned long nbr_active_done; unsigned long busy; + struct dma_slave_config config; u32 addr; u32 ctrl; @@ -1402,6 +1403,10 @@ static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan) return container_of(chan, struct coh901318_chan, chan); } +static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, + struct dma_slave_config *config, + enum dma_transfer_direction direction); + static inline const struct coh901318_params * cohc_chan_param(struct coh901318_chan *cohc) { @@ -2360,6 +2365,8 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, if (lli == NULL) goto err_dma_alloc; + coh901318_dma_set_runtimeconfig(chan, &cohc->config, direction); + /* initiate allocated lli list */ ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len, cohc->addr, @@ -2499,7 +2506,8 @@ static const struct burst_table burst_sizes[] = { }; static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, - struct dma_slave_config *config) + struct dma_slave_config *config, + enum dma_transfer_direction direction) { struct coh901318_chan *cohc = to_coh901318_chan(chan); dma_addr_t addr; @@ -2509,11 +2517,11 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, int i = 0; /* We only support mem to per or per to mem transfers */ - if (config->direction == DMA_DEV_TO_MEM) { + if (direction == DMA_DEV_TO_MEM) { addr = config->src_addr; addr_width = config->src_addr_width; maxburst = config->src_maxburst; - } else if (config->direction == DMA_MEM_TO_DEV) { + } else if (direction == DMA_MEM_TO_DEV) { addr = config->dst_addr; addr_width = config->dst_addr_width; maxburst = config->dst_maxburst; @@ -2579,6 +2587,16 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, return 0; } +static int coh901318_dma_slave_config(struct dma_chan *chan, + struct dma_slave_config *config) +{ + struct coh901318_chan *cohc = to_coh901318_chan(chan); + + memcpy(&cohc->config, config, sizeof(*config)); + + return 0; +} + static void coh901318_base_init(struct dma_device *dma, const int *pick_chans, struct coh901318_base *base) { @@ -2684,7 +2702,7 @@ static int __init coh901318_probe(struct platform_device *pdev) base->dma_slave.device_prep_slave_sg = coh901318_prep_slave_sg; base->dma_slave.device_tx_status = coh901318_tx_status; base->dma_slave.device_issue_pending = coh901318_issue_pending; - base->dma_slave.device_config = coh901318_dma_set_runtimeconfig; + base->dma_slave.device_config = coh901318_dma_slave_config; base->dma_slave.device_pause = coh901318_pause; base->dma_slave.device_resume = coh901318_resume; base->dma_slave.device_terminate_all = coh901318_terminate_all; @@ -2707,7 +2725,7 @@ static int __init coh901318_probe(struct platform_device *pdev) base->dma_memcpy.device_prep_dma_memcpy = coh901318_prep_memcpy; base->dma_memcpy.device_tx_status = coh901318_tx_status; base->dma_memcpy.device_issue_pending = coh901318_issue_pending; - base->dma_memcpy.device_config = coh901318_dma_set_runtimeconfig; + base->dma_memcpy.device_config = coh901318_dma_slave_config; base->dma_memcpy.device_pause = coh901318_pause; base->dma_memcpy.device_resume = coh901318_resume; base->dma_memcpy.device_terminate_all = coh901318_terminate_all; From patchwork Tue Sep 11 08:35:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146965 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386166ljw; Tue, 11 Sep 2018 01:36:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbiRizcyNiHn5pNX84rr9OKt0o8TRYlGsDuC9Dp80YVMRHf5/ACkGUxWeGoLItotsLogirr X-Received: by 2002:a17:902:e281:: with SMTP id cf1-v6mr26031373plb.86.1536654994142; Tue, 11 Sep 2018 01:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654994; cv=none; d=google.com; s=arc-20160816; b=VnRAzHnoOEARkSLX2jNAnqU8tmnpUsiMF5YnhcaZQKcvCF0jJybJiHmUBX3EtkD+Ir 8fDaHovAu0YZwKjaLmubHRK5LFjVCrxjsSRX8Ad1Rr8D9uSedTGqzRIvuLccsT5ZcB2U 7AvIbVtrSJef7F+5YnkeO5sgZz2gJWeOcSkD7mQ5G/1c6IXw+EjMr+4Gq6ImNZNN/Lo8 7GlVxO5xQ29ByWE1jsfeW9iqbSVjzx90Cm0FlKUmMQOUZCMoSfan1xTnVfrDAsXbJeGQ WbuHajvm6NCBsJGn0lCHlga5MOvItrZ9UMyFe6uWK88sZJuzHAJUDMj6keFig5YUlX1T lGXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PLK/FZK+q8ksbJ4UsCthBWOnra0zk4K27sMfxRxU3zY=; b=y4SqoWDIA2Vc5HyO8zOWfRf1vYPp0AMPE+YKmLaEWauMH5D2UiCxLuOx9y3RpVr3Oz t4ubpI7QCQrRkCoPPhUFBWfDhXUnvARchyTEoJeMARzqsQ9UX7hIl8tKQVvooS2zvI8s qMTX8H+5IAibd8zsy8Zv8NZD0/qOxkx9Jm3kEYzhovnoOf0SO6vWA+ezhFE+C7w880ZM XPpC0AKWmf7ChCLHWR8w0IC8BhMSqjh64b/6cFeg5fhoK6dqunM1b/VVMYU+bQipX1PQ 6X2evCGqzpAQDK0oafaaFQo9wrXG35ut388Vaihidwt8psgEr8xR6SMiNctuaJURFr1h mPSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cbs4BqST; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.33; Tue, 11 Sep 2018 01:36:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cbs4BqST; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbeIKNer (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:52220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNer (ORCPT ); Tue, 11 Sep 2018 09:34:47 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B293820870; Tue, 11 Sep 2018 08:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654992; bh=W9mMSOkcW+9aQIDQReFEmCf+mRnV5aVkzXhQzF7MeiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cbs4BqSTAGT9Lo985d2PAeO3x1+TcdkA+HMOVCIuE7+KegjbBiwNHbBzvXSJZ1hyj DyjyCnOr9NpXa9U+iJbqmehGyO5tgirVEdgDgESzJeFRlD/shASyIQ3NakRqvNcOYJ 8RX7ck/zexpU/Yt5nh/GY+fmXfm+cdItZeQtIQcc= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul Subject: [PATCH 04/12] dmaengine: jz4740: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:28 +0530 Message-Id: <20180911083536.16482-5-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- drivers/dma/dma-jz4740.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -- 2.14.4 diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c index afd5e10f8927..5253e3c0dc04 100644 --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c @@ -113,6 +113,7 @@ struct jz4740_dma_desc { struct jz4740_dmaengine_chan { struct virt_dma_chan vchan; unsigned int id; + struct dma_slave_config config; dma_addr_t fifo_addr; unsigned int transfer_shift; @@ -203,8 +204,9 @@ static enum jz4740_dma_transfer_size jz4740_dma_maxburst(u32 maxburst) return JZ4740_DMA_TRANSFER_SIZE_32BYTE; } -static int jz4740_dma_slave_config(struct dma_chan *c, - struct dma_slave_config *config) +static int jz4740_dma_slave_config_write(struct dma_chan *c, + struct dma_slave_config *config, + enum dma_transfer_direction direction) { struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c); struct jz4740_dma_dev *dmadev = jz4740_dma_chan_get_dev(chan); @@ -214,7 +216,7 @@ static int jz4740_dma_slave_config(struct dma_chan *c, enum jz4740_dma_flags flags; uint32_t cmd; - switch (config->direction) { + switch (direction) { case DMA_MEM_TO_DEV: flags = JZ4740_DMA_SRC_AUTOINC; transfer_size = jz4740_dma_maxburst(config->dst_maxburst); @@ -265,6 +267,15 @@ static int jz4740_dma_slave_config(struct dma_chan *c, return 0; } +static int jz4740_dma_slave_config(struct dma_chan *c, + struct dma_slave_config *config) +{ + struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c); + + memcpy(&chan->config, config, sizeof(*config)); + return 0; +} + static int jz4740_dma_terminate_all(struct dma_chan *c) { struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c); @@ -407,6 +418,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_slave_sg( desc->direction = direction; desc->cyclic = false; + jz4740_dma_slave_config_write(c, &chan->config, direction); + return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); } @@ -438,6 +451,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_dma_cyclic( desc->direction = direction; desc->cyclic = true; + jz4740_dma_slave_config_write(c, &chan->config, direction); + return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); } From patchwork Tue Sep 11 08:35:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146964 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386198ljw; Tue, 11 Sep 2018 01:36:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbOdIZDWlz/niVXW+1wknXKvKBQ6ReuqwomBRfB+79ns1aFrfOFxkZW4WPGc6JF4A7Ggp38 X-Received: by 2002:a63:4d21:: with SMTP id a33-v6mr27038732pgb.408.1536654996526; Tue, 11 Sep 2018 01:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654996; cv=none; d=google.com; s=arc-20160816; b=G+w1Z6JQEa28a8HvHGhKprBIhEOWCIppZtmx3ZwWAavc/+0+6mlLqBXwYqsdcfyKNX KiE0zrSZ6gqKvUz/kT115G5fHsJPApp5e9TWvbw+wmOrlBI98FAtOLNKjopTBvpPsHdQ 24rO2tbUZDlAeqDrs8Qhe95hAfTb5qTvMiaXBmlAO5oE2xfbLiHGkCUyc5vJC0/0aMii Kg3XeHXjMkevUYsdc1AWojaRDN3aY4KaGp7NZbcosZa90mWdp2GhYmqk6p+1EGdgr2+b NdunyntkHd4aeb8sAfMaDBGWG1Em6b/E4uyGOSdoR7GAxYWAa977t/ZJ9RVAMW3hltsY upmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=HzSa65QQYMUMj8tlm4TMzhIqsnGN1mxbY0GYxM4DT7o=; b=uP8/NliHJnVa8zwGZoeypW9GrjgQiWIm7QLTwdKpImK3RBz11rC/GpJQU7Fg0bkLYO d+n/DtqEMKuIosPfqyl/cK6evkDbX2wUF2TxNcMGBNFxayvV9b1bqfwjeKQekZ0F4zL6 /+N9QNV6dZmLTh3PXrGxQMbG/Q1VM3yMe/u2v3zuiJKxhWRVuPHSeh9wCjIKBEpfNv1x EJxtCix8z1mGZrIRRaTuc9gtmMo6S+1WO7j4tCZy5mwjhAq16KDj7D0WVZyccPDxt3N0 0L14oXa+nm/Ntp/qwA3tf9fbWgMK0ncY50bDXULkdv+T5VjFukkjMfe+qnBnxgLeodUX b5KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ihP0WhOo; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.36; Tue, 11 Sep 2018 01:36:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ihP0WhOo; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbeIKNeu (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:52240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNeu (ORCPT ); Tue, 11 Sep 2018 09:34:50 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A538520870; Tue, 11 Sep 2018 08:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654995; bh=YwcRFHdufay0K2mEkRq7eAMIN4m903B1r3ZsP3D8ETg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ihP0WhOosHVy8uokkl5q6dZdlEFhKAwHOxlcmnlL6qG6MoVjSn86A8nk17Fm+6v5v 6XWemjLQsbw+ke0ziRpisPWq5rlCEdRtmSsMvirCKNQHBlKj/PcFAXX+BhM+ia1gjV mO9NgkVXqwAo59iGwXpIRuwvrrT+CO3BMVsrLp90= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Viresh Kumar , Andy Shevchenko Subject: [PATCH 05/12] dmaengine: dw: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:29 +0530 Message-Id: <20180911083536.16482-6-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Viresh Kumar CC: Andy Shevchenko drivers/dma/dw/core.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.14.4 Acked-by: Andy Shevchenko diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index f43e6dafe446..d0c3e50b39fb 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -886,12 +886,7 @@ static int dwc_config(struct dma_chan *chan, struct dma_slave_config *sconfig) */ u32 s = dw->pdata->is_idma32 ? 1 : 2; - /* Check if chan will be configured for slave transfers */ - if (!is_slave_direction(sconfig->direction)) - return -EINVAL; - memcpy(&dwc->dma_sconfig, sconfig, sizeof(*sconfig)); - dwc->direction = sconfig->direction; sc->src_maxburst = sc->src_maxburst > 1 ? fls(sc->src_maxburst) - s : 0; sc->dst_maxburst = sc->dst_maxburst > 1 ? fls(sc->dst_maxburst) - s : 0; From patchwork Tue Sep 11 08:35:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146963 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386232ljw; Tue, 11 Sep 2018 01:36:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZabIe4dRo/FoQDJIvveSP9UBGJrIYkcn3iGDrayhvYfToeT+iBcT4oQ9za3/n0Qb5JC9NH X-Received: by 2002:a62:f909:: with SMTP id o9-v6mr27996447pfh.141.1536654999704; Tue, 11 Sep 2018 01:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536654999; cv=none; d=google.com; s=arc-20160816; b=diIY////WIiHUIjOxp8gEmHHvqAG+1bVeiviVkExy1TR1FzBMN7aa/4IbCqv8xLWnX zd7GRZKDriUWnsUzS6DVZF/Z7PTHMi7xRuKobUo4V3+iRyEznB/1T05lQS/P6sG0qth8 KUUUzjxg8ihN3r38nEydlGdb9YwPujYpyu0yOehZ8hKZt08eNQnbFbPiQKVWFJptCw94 uRr84bPPc4BX+fviLItoi1JQ0qQZbhBqIucmBjmkNvmj10ZOh/Z3VoR8s4OOj/ISFsKC U+3T0eVGUbz1H8bI/Gv931OAxvCGsB2yX02KQuWMIaxOx5Bp/ZHrRVebOm7BZdoppdQK Kw0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=CF04F46u9K7CsCw2864V37p0J56z0qoDX7JKY2x+It8=; b=cvNKQ2gWt+s9c/adlD/LAk7eZW7dJlVXVkFkLs+nOwVvysi9p8SOWf/mPxQyKi7IDZ y2GD24X4EcJJbDyDKFxXArhwGDYxc8pktRUWw3PZe9YXTH51CUu2J6C3X9738UU6duLT C3j19AM/PrHLePjOhRfVC0ifv631Xg+Udw3vBHmkBb5HiuAGb4hbLH/80a+QS9NxXJsJ xpxjIBoUY0mTHJ9Y64YHKmny96ju5gVTQk+pkaNTQXqQT4RPz+IyI+K8PIjI0HKzgMkx aa6rmUmw/76gQj7I8y3qW0bFOHdD0kjAV/Q7vE5dzUhfJdx/3FRcpHyGLLAiKWakL5Dc O73g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B704ZPEO; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.39; Tue, 11 Sep 2018 01:36:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B704ZPEO; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbeIKNex (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:52260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNex (ORCPT ); Tue, 11 Sep 2018 09:34:53 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3999020870; Tue, 11 Sep 2018 08:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654997; bh=wSvRLqBbf8LAwqX8if7+TukDJpNxSM3cdanfE/GNx4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B704ZPEOnrlfiFcQ7z8xrr2XwuitJTsxKjiKE492/tv0EQjpNxeqSFICtm2jP5oDH 69/kyC3Cl3TFULTFbpF2KHwU5iaLLD05BQyKNolbCFSRngVhsvsKWkP7OOCDkXlh7f 7QBHcrJRlBjQ8oB9/afHr53avYGFIKXxgiXw5R0M= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul Subject: [PATCH 06/12] dmaengine: fsl-edma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:30 +0530 Message-Id: <20180911083536.16482-7-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- drivers/dma/fsl-edma.c | 87 ++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 41 deletions(-) -- 2.14.4 diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index c7568869284e..f8b4408aedb8 100644 --- a/drivers/dma/fsl-edma.c +++ b/drivers/dma/fsl-edma.c @@ -140,14 +140,6 @@ struct fsl_edma_sw_tcd { struct fsl_edma_hw_tcd *vtcd; }; -struct fsl_edma_slave_config { - enum dma_transfer_direction dir; - enum dma_slave_buswidth addr_width; - u32 dev_addr; - u32 burst; - u32 attr; -}; - struct fsl_edma_chan { struct virt_dma_chan vchan; enum dma_status status; @@ -156,7 +148,8 @@ struct fsl_edma_chan { u32 slave_id; struct fsl_edma_engine *edma; struct fsl_edma_desc *edesc; - struct fsl_edma_slave_config fsc; + struct dma_slave_config cfg; + u32 attr; struct dma_pool *tcd_pool; }; @@ -164,6 +157,7 @@ struct fsl_edma_desc { struct virt_dma_desc vdesc; struct fsl_edma_chan *echan; bool iscyclic; + enum dma_transfer_direction dirn; unsigned int n_tcds; struct fsl_edma_sw_tcd tcd[]; }; @@ -347,20 +341,8 @@ static int fsl_edma_slave_config(struct dma_chan *chan, { struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan); - fsl_chan->fsc.dir = cfg->direction; - if (cfg->direction == DMA_DEV_TO_MEM) { - fsl_chan->fsc.dev_addr = cfg->src_addr; - fsl_chan->fsc.addr_width = cfg->src_addr_width; - fsl_chan->fsc.burst = cfg->src_maxburst; - fsl_chan->fsc.attr = fsl_edma_get_tcd_attr(cfg->src_addr_width); - } else if (cfg->direction == DMA_MEM_TO_DEV) { - fsl_chan->fsc.dev_addr = cfg->dst_addr; - fsl_chan->fsc.addr_width = cfg->dst_addr_width; - fsl_chan->fsc.burst = cfg->dst_maxburst; - fsl_chan->fsc.attr = fsl_edma_get_tcd_attr(cfg->dst_addr_width); - } else { - return -EINVAL; - } + memcpy(&fsl_chan->cfg, cfg, sizeof(*cfg)); + return 0; } @@ -370,7 +352,7 @@ static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan, struct fsl_edma_desc *edesc = fsl_chan->edesc; void __iomem *addr = fsl_chan->edma->membase; u32 ch = fsl_chan->vchan.chan.chan_id; - enum dma_transfer_direction dir = fsl_chan->fsc.dir; + enum dma_transfer_direction dir = edesc->dirn; dma_addr_t cur_addr, dma_addr; size_t len, size; int i; @@ -550,7 +532,7 @@ static struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( u32 src_addr, dst_addr, last_sg, nbytes; u16 soff, doff, iter; - if (!is_slave_direction(fsl_chan->fsc.dir)) + if (!is_slave_direction(direction)) return NULL; sg_len = buf_len / period_len; @@ -558,9 +540,21 @@ static struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( if (!fsl_desc) return NULL; fsl_desc->iscyclic = true; + fsl_desc->dirn = direction; dma_buf_next = dma_addr; - nbytes = fsl_chan->fsc.addr_width * fsl_chan->fsc.burst; + if (direction == DMA_MEM_TO_DEV) { + fsl_chan->attr = + fsl_edma_get_tcd_attr(fsl_chan->cfg.dst_addr_width); + nbytes = fsl_chan->cfg.dst_addr_width * + fsl_chan->cfg.dst_maxburst; + } else { + fsl_chan->attr = + fsl_edma_get_tcd_attr(fsl_chan->cfg.src_addr_width); + nbytes = fsl_chan->cfg.src_addr_width * + fsl_chan->cfg.src_maxburst; + } + iter = period_len / nbytes; for (i = 0; i < sg_len; i++) { @@ -570,20 +564,20 @@ static struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( /* get next sg's physical address */ last_sg = fsl_desc->tcd[(i + 1) % sg_len].ptcd; - if (fsl_chan->fsc.dir == DMA_MEM_TO_DEV) { + if (direction == DMA_MEM_TO_DEV) { src_addr = dma_buf_next; - dst_addr = fsl_chan->fsc.dev_addr; - soff = fsl_chan->fsc.addr_width; + dst_addr = fsl_chan->cfg.dst_addr; + soff = fsl_chan->cfg.dst_addr_width; doff = 0; } else { - src_addr = fsl_chan->fsc.dev_addr; + src_addr = fsl_chan->cfg.src_addr; dst_addr = dma_buf_next; soff = 0; - doff = fsl_chan->fsc.addr_width; + doff = fsl_chan->cfg.src_addr_width; } fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, dst_addr, - fsl_chan->fsc.attr, soff, nbytes, 0, iter, + fsl_chan->attr, soff, nbytes, 0, iter, iter, doff, last_sg, true, false, true); dma_buf_next += period_len; } @@ -603,42 +597,53 @@ static struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( u16 soff, doff, iter; int i; - if (!is_slave_direction(fsl_chan->fsc.dir)) + if (!is_slave_direction(direction)) return NULL; fsl_desc = fsl_edma_alloc_desc(fsl_chan, sg_len); if (!fsl_desc) return NULL; fsl_desc->iscyclic = false; + fsl_desc->dirn = direction; - nbytes = fsl_chan->fsc.addr_width * fsl_chan->fsc.burst; + if (direction == DMA_MEM_TO_DEV) { + fsl_chan->attr = + fsl_edma_get_tcd_attr(fsl_chan->cfg.dst_addr_width); + nbytes = fsl_chan->cfg.dst_addr_width * + fsl_chan->cfg.dst_maxburst; + } else { + fsl_chan->attr = + fsl_edma_get_tcd_attr(fsl_chan->cfg.src_addr_width); + nbytes = fsl_chan->cfg.src_addr_width * + fsl_chan->cfg.src_maxburst; + } for_each_sg(sgl, sg, sg_len, i) { /* get next sg's physical address */ last_sg = fsl_desc->tcd[(i + 1) % sg_len].ptcd; - if (fsl_chan->fsc.dir == DMA_MEM_TO_DEV) { + if (direction == DMA_MEM_TO_DEV) { src_addr = sg_dma_address(sg); - dst_addr = fsl_chan->fsc.dev_addr; - soff = fsl_chan->fsc.addr_width; + dst_addr = fsl_chan->cfg.dst_addr; + soff = fsl_chan->cfg.dst_addr_width; doff = 0; } else { - src_addr = fsl_chan->fsc.dev_addr; + src_addr = fsl_chan->cfg.src_addr; dst_addr = sg_dma_address(sg); soff = 0; - doff = fsl_chan->fsc.addr_width; + doff = fsl_chan->cfg.src_addr_width; } iter = sg_dma_len(sg) / nbytes; if (i < sg_len - 1) { last_sg = fsl_desc->tcd[(i + 1)].ptcd; fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, - dst_addr, fsl_chan->fsc.attr, soff, + dst_addr, fsl_chan->attr, soff, nbytes, 0, iter, iter, doff, last_sg, false, false, true); } else { last_sg = 0; fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, - dst_addr, fsl_chan->fsc.attr, soff, + dst_addr, fsl_chan->attr, soff, nbytes, 0, iter, iter, doff, last_sg, true, true, false); } From patchwork Tue Sep 11 08:35:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146962 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386278ljw; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZe+RsrGeZ3kGY6yO/8lupjeIJtzu2kTLABUZOZZ/5TMSrVq6j15nNGeJQ4lIbfbDD5sDTA X-Received: by 2002:a17:902:f209:: with SMTP id gn9mr25907588plb.173.1536655002593; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655002; cv=none; d=google.com; s=arc-20160816; b=TQejbb/gS9RoO8uniERcwlm7vYIXedExebKTUq2QICedlB+rP4FEf2K3JT+c1+KWmp n/kGwyHB8Fy799gK9YtCBlFHJ6ddh4ZTLIpKCyzzfmVj20/rR+f/iGiEjtuyZrpEBiTA y5K7i7hysSILsItAhX4+2uXr+iq5j6ue6vxLCynGAmpF6IStZ9KsOiON3ziNtIg0XQ0G hFWSRbnOmfcaUrmXRUIPA+Ck2b8L1+J2ege6XmXfU3g3BRxVIVo06QyBQo6/gyen9obT 0F9kcBmZwmoaCcYFFm+vF/U/LwKHAA6PbWSCjNce3y3bp7Ysaq/uZJWGiMgGWk/955jB 57cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=q2ts/uwLkkCpQZbM8+KNxNRIOyJsbJ0WPIKLRDNFLTo=; b=UdE1G3ly0dLEUiisNgK4GLdI2WpxsIifUNitjQ/hOXBiehXpg+GkAOKe9NLdrpP3zF +QT2RbAAJG/XnlPQtREnXqCWEkiXcxz2M+bzCWQ8sekmwtX/NJ4NlkNxldaB73R4cc7D FgtGK5BGDNxNd0gY4YcmH6svqLroUNV1xKO9c2/Yq7dCrDa79Ad68nA8Eg4MbsCVxhGt kZvvom0NbD5nq16XcGGbdUyItlwxR+brSA6Pek8ezAXQWIyv8fimQNz41dbmYf4nt7mG NNcscKt2KEROMhKz/TP3UhEEKAt1Ih8rqH1XdHvmblL/pZGxhWJ6eonbHbXjMzGN2l4O Xt3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lySSBfzL; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.42; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lySSBfzL; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726569AbeIKNe4 (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbeIKNe4 (ORCPT ); Tue, 11 Sep 2018 09:34:56 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13D6220880; Tue, 11 Sep 2018 08:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536654999; bh=OaEXva+QICvlkf6bownaIvps4Nr2nG1uFdNNqtz4mY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lySSBfzLOFrj8I9yeqFlkx1783YVuQm8Uj8hcbcKtFyhBxijwyGIG2K1h1ZjQEPyq Ew08poAuwBWH9ArLpdOSEGtZw1c4ZlAZVBorXCR3jN5Tqt0Sly/ba9X4TFqeYbNv8P JvnP7QzDK0t+xsZI1eCC0izXyk/EnqCsANKmB0V0= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Andy Shevchenko Subject: [PATCH 07/12] dmaengine: hsu: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:31 +0530 Message-Id: <20180911083536.16482-8-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Andy Shevchenko drivers/dma/hsu/hsu.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.14.4 Acked-by: Andy Shevchenko diff --git a/drivers/dma/hsu/hsu.c b/drivers/dma/hsu/hsu.c index 202ffa9f7611..e06f20272fd7 100644 --- a/drivers/dma/hsu/hsu.c +++ b/drivers/dma/hsu/hsu.c @@ -348,10 +348,6 @@ static int hsu_dma_slave_config(struct dma_chan *chan, { struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan); - /* Check if chan will be configured for slave transfers */ - if (!is_slave_direction(config->direction)) - return -EINVAL; - memcpy(&hsuc->config, config, sizeof(hsuc->config)); return 0; From patchwork Tue Sep 11 08:35:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146961 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386285ljw; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZEGZMMmRjxlMEQ5x06Uw+ocBoEpMvvL/foak+gtySAUHrZfU70n1l5/Rm60rDsC5OMGlZh X-Received: by 2002:a17:902:a987:: with SMTP id bh7-v6mr26481503plb.182.1536655002861; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655002; cv=none; d=google.com; s=arc-20160816; b=GRHDaUyTgLrwJSIkf4rAxNMTCFUm2vvsKPbD0sFlbwEsjjev7r0C4fW7X9RfAlNeRK h/8U8aY9ZHwRukZ0TM+QssfKuuvRsoZYOYv54tTCSH3Dq1gQ2WXYOLN/xxyOjDxuBahz rGumKPqvvnzBXz4RQXmgyLZy7hClVkmdKRaPMuYsz+L0TjKRBKu+4qW8XV8k1JiAvuI+ VQCTb9oMML3IjWV2/gzN5p+7n5J8erqARW65Do4rNYlAPtqQ/yokLtyq4ZkDWgAwyipk B3uQui1uJ6bSSEGaVODBQmADVlSrXz2eohUzhVHFwVFDrQNCJnEgXcHd3TeAYaZDyU0Q pv2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=V8/zKJv5tbeeoCEmmFpOA3/8/5fDlLmKXHDTb21b3I8=; b=jSBGUmf6W0L4P2d1hmM1xasHhOjpzyU9ryROAOZiFzu8hq7X8EVl7O1Tmi4fs/W5SZ mlzwnOD6wB0agVWFHavOS5NXSPSimUe2qAij//PLR7lQ9y2KcmqRGXBRJwolRRLu6k4H lYK9qXWRrRBCEKvPNth9fsS8nzteq1qpFOeO7JfWI8RzOLiu1yTtPcbKIQ+L8iiETaN3 ikB15lis938IKrSYUeyl726d26hx3hGEu2PIgmhTy2QjH60gmIlYpRFwXXqZr/cvgEbP /OK8+f+Ln9lx5iCaG1zgzQpLOcbIfRIfjDUdOh5xIJOU8EebVbEDI1NgGwlZKpxe8Wly GoGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tauRlDps; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.42; Tue, 11 Sep 2018 01:36:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tauRlDps; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbeIKNe4 (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbeIKNe4 (ORCPT ); Tue, 11 Sep 2018 09:34:56 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3853520881; Tue, 11 Sep 2018 08:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536655001; bh=qAt9WdW/ehc/cYraQU7loq8iaHl2TmbST+88XdUUlJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tauRlDpsjvjFR0PBkRt8dKfTVrJaEAks5v6Kr6Y8CX+uhphgQYAlH/ayjl4EjlEhS rEpIeXi60GkF+7aBkWA0HruAwI/ZcpWfnOZ7lNgPCNjoq5k3ifKEcp4ObjvCBnGhSe TgiKmK6xxkfNzhk3/s5MFuVR0wbr6wHQl8xRbkxw= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Andy Shevchenko Subject: [PATCH 08/12] dmaengine: idma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:32 +0530 Message-Id: <20180911083536.16482-9-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Andy Shevchenko drivers/dma/idma64.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.14.4 Acked-by: Andy Shevchenko diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c index 1fbf9cb9b742..40dc5d2ddf3d 100644 --- a/drivers/dma/idma64.c +++ b/drivers/dma/idma64.c @@ -408,10 +408,6 @@ static int idma64_slave_config(struct dma_chan *chan, { struct idma64_chan *idma64c = to_idma64_chan(chan); - /* Check if chan will be configured for slave transfers */ - if (!is_slave_direction(config->direction)) - return -EINVAL; - memcpy(&idma64c->config, config, sizeof(idma64c->config)); convert_burst(&idma64c->config.src_maxburst); From patchwork Tue Sep 11 08:35:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146960 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386316ljw; Tue, 11 Sep 2018 01:36:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ3KefH2Q7SACPoqsT59Sa45QOU0pnid/AIHd18ilZwOJpuUN+bQ6wlUcS6Hru2irQeIQMX X-Received: by 2002:a65:4c43:: with SMTP id l3-v6mr26875010pgr.451.1536655005120; Tue, 11 Sep 2018 01:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655005; cv=none; d=google.com; s=arc-20160816; b=QXtmTsxoaj443aw0GfQyUx8t8PpLmlcT2I/aOAamxyi+i6eKZFZMS4Mto8Y48NHkc6 hhNJy9qM4g6WXln78nhPxK8sC5WKI1FNEVlypDtY1QPCKZEXrJRikz3tOQZcM62e2ANk 2ktVolf7gP2Dx+geVJg4TZfLGlxuadGHXTriu1MZn8DInb5gO7s1eTrAApXPY5bzBA7j yOI+V+uJ6htZlQcaiasxTFvLEljxBH+KXiqLjXkxNbXD0D43Q/X6nAYmra1SdxelPG+m j6aj17Xk+ulqtT6O01oOmHpLwtG366cZYL0LS6rpYphyDEDpGYsfR9ofrmYvWOo6U4M5 Htag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4GMcXJXHS+JE06jDbKbBy8dqv6EX1wJgnUK3hHW3oLE=; b=gGCG+Sc6r9oFRyVVUJ/oZ5hWQRfVzjiGi3EH1e6+APlfjRFh9UdYkaxOIAehodpUUX 3CXVsQ0J+6DEGF7KEIoYlyAZcy3J7pK1VhQx62+bgYBqPPcutTwV7qHHmIHITOMJ42A5 Jur8yEKHUlxh6B5LsRz4CFATTvhKCHjPBbgOIp4PYGU8DBAZsOYQUROK0RpZXEwSu/92 vWYUjTwRmT9ljgU43LQICf8FBRatPX83TS3dO0W5Q65NhBEwAK6gtzRpAOTd/3CQhSWG fUcBS2/RCOvUXhuN+yAhluEbrRqwavZw4a401V5tXYFlyErBkiyIDrVQHqOT864BiYfC lv1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="I5Hp/WfN"; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.44; Tue, 11 Sep 2018 01:36:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="I5Hp/WfN"; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726572AbeIKNe6 (ORCPT + 3 others); Tue, 11 Sep 2018 09:34:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:52318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbeIKNe6 (ORCPT ); Tue, 11 Sep 2018 09:34:58 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CC9320870; Tue, 11 Sep 2018 08:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536655003; bh=IOS9jx/zhvP2HJ4aeGn0nBgEiLp//2rTY4KwqHrx0AU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I5Hp/WfN70t8HxnhxVlKKb9sGaTcMEbA57uWnc7hL6FdKt7k55aAVqttBUS6e3xB7 3geA9qPj0Ke0JCYlSergioOL6IfG5So4S8nFvT6MYuWPWoSUE7a0fw2hCXv9HQqYmz vXHM9Dehz4qm1m4ZG8fXLfGVYCnNzCof4tct63UU= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Fabio Estevam Subject: [PATCH 09/12] dmaengine: imx-dma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:33 +0530 Message-Id: <20180911083536.16482-10-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Fabio Estevam drivers/dma/imx-dma.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) -- 2.14.4 diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 75b6ff0415ee..c2fff3f6c9ca 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -162,6 +162,7 @@ struct imxdma_channel { bool enabled_2d; int slot_2d; unsigned int irq; + struct dma_slave_config config; }; enum imx_dma_type { @@ -675,14 +676,15 @@ static int imxdma_terminate_all(struct dma_chan *chan) return 0; } -static int imxdma_config(struct dma_chan *chan, - struct dma_slave_config *dmaengine_cfg) +static int imxdma_config_write(struct dma_chan *chan, + struct dma_slave_config *dmaengine_cfg, + enum dma_transfer_direction direction) { struct imxdma_channel *imxdmac = to_imxdma_chan(chan); struct imxdma_engine *imxdma = imxdmac->imxdma; unsigned int mode = 0; - if (dmaengine_cfg->direction == DMA_DEV_TO_MEM) { + if (direction == DMA_DEV_TO_MEM) { imxdmac->per_address = dmaengine_cfg->src_addr; imxdmac->watermark_level = dmaengine_cfg->src_maxburst; imxdmac->word_size = dmaengine_cfg->src_addr_width; @@ -723,6 +725,16 @@ static int imxdma_config(struct dma_chan *chan, return 0; } +static int imxdma_config(struct dma_chan *chan, + struct dma_slave_config *dmaengine_cfg) +{ + struct imxdma_channel *imxdmac = to_imxdma_chan(chan); + + memcpy(&imxdmac->config, dmaengine_cfg, sizeof(*dmaengine_cfg)); + + return 0; +} + static enum dma_status imxdma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) @@ -905,6 +917,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic( desc->desc.callback = NULL; desc->desc.callback_param = NULL; + imxdma_config_write(chan, &imxdmac->config, direction); + return &desc->desc; } From patchwork Tue Sep 11 08:35:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146959 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386347ljw; Tue, 11 Sep 2018 01:36:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZTY89IzB9UaGa82XyWuDGANQ1UT2Pt8OkAeTRLb6mkNsJ7/M3xCh7iVJ+2yxV43eltwb1H X-Received: by 2002:a62:e08b:: with SMTP id d11-v6mr28165311pfm.214.1536655007364; Tue, 11 Sep 2018 01:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655007; cv=none; d=google.com; s=arc-20160816; b=iHwnrxUBGsGyY3oU5Oo7DSeVH/C4F3Wyd2IYVhWrn3kS4fywu5Kkx2ftl60fKoqtdY I+Bwtl2c0SXJDTuDaYaPHygywPfbz9pX1amnNWtRf7jeAYutwUCH8+zSFmkIthyJI59E J4xunI16jsBPNEslybHfwtj6GB4fpLPPMilrYjflTNEjCSZ1Vzfs+zljf9zVzExl4OHF F1ZCQlU/z44blVeUdRHeX7IsYm79SqNXJjRrmPFB9072IBbvEW7FHrawyUjWGJMGkyH5 2N1qNmJQruh6AUpPcywkC+XPYQrANckOPmc0conkeYSQrY1ec/KBEkxGBNT9lvYTfLtO O8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=W6RIWwmlEQb0qmMQIRlEck5/4yPrjQ53MmEgKjK9L6E=; b=XTRlikfsC3fQLUyYk/syiG+pCZAqCK8/tJVg3upLVxcIvDQXmhSBVrkpAdViUxAKvQ Ml0VShF1eUQSTPba2NKruZ6n2v1qI6pr9huEQcBf32MBgG3YLuKv821Lmn2OPdI1ekrZ YT+nB8atxitIB1Fhae+/xMkGtLk/k78DDsDdsZrZ0JlAbzANEIPGpF7JLQJwwBl05oxr 3ef/zX9ZBHrYHqloD8Y1KBMN1ul1t0/6kBL9A3DIN8e+yZaPeOsna1aW1tJjZDFsxHxa fXlUfko/swErvfoiCkf3PKqFAGqhSXOcMAf2Xih/rl8uP9xl2PGG5qKvrE5zc3QU92GS Rb5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VrZBzjQs; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.47; Tue, 11 Sep 2018 01:36:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VrZBzjQs; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbeIKNfB (ORCPT + 3 others); Tue, 11 Sep 2018 09:35:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:52338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbeIKNfB (ORCPT ); Tue, 11 Sep 2018 09:35:01 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81BD220880; Tue, 11 Sep 2018 08:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536655006; bh=BwsAZc238C9odLx+oP2I4FQy0z9GL2o4Efchzkn9hUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VrZBzjQsbMsof16Fym/6veP6Om/YG5JYeowT//kE1OfTc/mzmTni/Xaxk8l+f3wOq qzsE9p4vlLWsaK3oElXARN7RgkXd/flPRspkvHa70SYUqjzRQ8AucGXllQeqDpTTSa b4vbUbAC5yKCxj0XJmtTHKD+3o9/znSrkQIjfRJo= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul , Zhangfei Gao Subject: [PATCH 10/12] dmaengine: k3dma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:34 +0530 Message-Id: <20180911083536.16482-11-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- CC: Zhangfei Gao drivers/dma/k3dma.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) -- 2.14.4 diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 6bfa217ed6d0..10e2e0a0735b 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -91,6 +91,7 @@ struct k3_dma_chan { dma_addr_t dev_addr; enum dma_status status; bool cyclic; + struct dma_slave_config slave_config; }; struct k3_dma_phy { @@ -118,6 +119,10 @@ struct k3_dma_dev { #define to_k3_dma(dmadev) container_of(dmadev, struct k3_dma_dev, slave) +static int k3_dma_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *cfg); + static struct k3_dma_chan *to_k3_chan(struct dma_chan *chan) { return container_of(chan, struct k3_dma_chan, vc.chan); @@ -542,6 +547,7 @@ static struct dma_async_tx_descriptor *k3_dma_prep_slave_sg( if (!ds) return NULL; num = 0; + k3_dma_config_write(chan, dir, &c->slave_config); for_each_sg(sgl, sg, sglen, i) { addr = sg_dma_address(sg); @@ -602,6 +608,7 @@ k3_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, avail = buf_len; total = avail; num = 0; + k3_dma_config_write(chan, dir, &c->slave_config); if (period_len < modulo) modulo = period_len; @@ -642,13 +649,21 @@ static int k3_dma_config(struct dma_chan *chan, struct dma_slave_config *cfg) { struct k3_dma_chan *c = to_k3_chan(chan); + + memcpy(&c->slave_config, cfg, sizeof(*cfg)); + + return 0; +} + +static int k3_dma_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *cfg) +{ + struct k3_dma_chan *c = to_k3_chan(chan); u32 maxburst = 0, val = 0; enum dma_slave_buswidth width = DMA_SLAVE_BUSWIDTH_UNDEFINED; - if (cfg == NULL) - return -EINVAL; - c->dir = cfg->direction; - if (c->dir == DMA_DEV_TO_MEM) { + if (dir == DMA_DEV_TO_MEM) { c->ccfg = CX_CFG_DSTINCR; c->dev_addr = cfg->src_addr; maxburst = cfg->src_maxburst; From patchwork Tue Sep 11 08:35:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146958 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386382ljw; Tue, 11 Sep 2018 01:36:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYAB4wBLsp9eGqOfWOplJ1LUl3tHe0ZvLnqcGdvrEQU+BZggY3LtibJt71PpvdMPIQj+3xg X-Received: by 2002:a17:902:7e06:: with SMTP id b6-v6mr26434028plm.230.1536655009457; Tue, 11 Sep 2018 01:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655009; cv=none; d=google.com; s=arc-20160816; b=XO7GxELDacGDI6TKwe2GJf5t+hAROUzOIlbwo58MO0ZojW7c1CmlToFcxyHuKy7dK/ BcnaYu0rxFdW/xj48jWz0uqpH/oRJRGp8+CnUi/ANAhteMCyyZ+TPCcMKlBOQtCIZnXA cVBuAbaYG0bn65BcYR7Fg7lES10Hc9wzoQoeto1iW5xSu7X34x9NU6QD4xGadZh/eTXi Pfk5yhuHOKb9oHUtFk7aqhOQwvP/La6UhGBP14zURuTmpJJI+qHX0UuprHpiMUfP23IB mQFt+/t6KqTdJRChCraAI2D16l8prFpY+DbFbgKdmkyAZfXAAJN1EiKY0SfBOtB4G7Z/ cKOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=qnTD2u5bS9VoVajB+Jl5QbN/8RNsXzcLDcz5iEcGetU=; b=sprMxoN+ue1N+0DdyM7k5wckLifconUkJotr3RlYiKI82tAzjZOnpioMtPEtmDCB4p 5YAvKWFPWiAcKD5ZKiZNX2Nps6r5jvaBh2DzUHqKEl1Ei6N1K+6aJmmd8E6QIim/F4OW Od4RY1KeK7206bWNwrMhPbVOhANEzPkL2AqXS7cTAXtvxCQYuE7P5RdiyzJhk9sZ9xKj /7C3T2F3XyAy7VH3UXNsAb0T4BvHeV0i0ulx3VQ3LXPWJg9tX6UPyYBIbYbausuusipz mTzSHAePFI7+NhdWSZJR77seAyNEXBqoptMlz2RN3Y9/jmGA/9tvHpWeTTT1ac81Eh0B jlGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wBjtaXGz; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.49; Tue, 11 Sep 2018 01:36:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wBjtaXGz; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbeIKNfD (ORCPT + 3 others); Tue, 11 Sep 2018 09:35:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbeIKNfD (ORCPT ); Tue, 11 Sep 2018 09:35:03 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A694B20882; Tue, 11 Sep 2018 08:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536655008; bh=F4b5OuvJP3ZFhUyVvPxEsuSN3nbihBdgsMjhxIVWl5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wBjtaXGz2pLSHBTrK2sbNpsZOofYPzWK33m+p+XcHzxr1R1UbbtvklbBK0cjE8sIK ZMdCDe1Xe2mvMc47OSlLJSDYbyIQFqGaVHzNTf/biMrb9RO9WEBWXk0y/WvtBFW1LQ JZj3UKZrz0jen1EHhhL75cKEuer3EMq0Z7WjuHvk= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul Subject: [PATCH 11/12] dmaengine: ep93xx_dma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:35 +0530 Message-Id: <20180911083536.16482-12-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- drivers/dma/ep93xx_dma.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -- 2.14.4 diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index a15592383d4e..f674eb5fbbef 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c @@ -109,6 +109,9 @@ #define DMA_MAX_CHAN_DESCRIPTORS 32 struct ep93xx_dma_engine; +static int ep93xx_dma_slave_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *config); /** * struct ep93xx_dma_desc - EP93xx specific transaction descriptor @@ -180,6 +183,7 @@ struct ep93xx_dma_chan { struct list_head free_list; u32 runtime_addr; u32 runtime_ctrl; + struct dma_slave_config slave_config; }; /** @@ -1051,6 +1055,8 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, return NULL; } + ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config); + first = NULL; for_each_sg(sgl, sg, sg_len, i) { size_t len = sg_dma_len(sg); @@ -1136,6 +1142,8 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr, return NULL; } + ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config); + /* Split the buffer into period size chunks */ first = NULL; for (offset = 0; offset < buf_len; offset += period_len) { @@ -1227,6 +1235,17 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan, struct dma_slave_config *config) { struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan); + + memcpy(&edmac->slave_config, config, sizeof(*config)); + + return 0; +} + +static int ep93xx_dma_slave_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *config) +{ + struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan); enum dma_slave_buswidth width; unsigned long flags; u32 addr, ctrl; @@ -1234,7 +1253,7 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan, if (!edmac->edma->m2m) return -EINVAL; - switch (config->direction) { + switch (dir) { case DMA_DEV_TO_MEM: width = config->src_addr_width; addr = config->src_addr; From patchwork Tue Sep 11 08:35:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 146957 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3386401ljw; Tue, 11 Sep 2018 01:36:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYE/tN5VKX11Ck3zsfqWY96h0B0ct+9xItsK3w3pk8yPzQnVXilxwtIu4MgTlTey9C88dM2 X-Received: by 2002:a62:9ed1:: with SMTP id f78-v6mr28312740pfk.206.1536655011287; Tue, 11 Sep 2018 01:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536655011; cv=none; d=google.com; s=arc-20160816; b=u4TlC1a3ecI5aKe15Sxol8trqFNwyt78yvHjO3ubPrZNg850SZwWVuC6BOgQ56Lxgq Xuyngr+w/39oizj3/RBng8+DGuGlcjOVcnOaJim0sAGvyhfE+QPl16K44DnTFFVB31Dj SKwebSLBPVHieWJoHRn3z8+fJ9x7torBuc4EvYHQhy8Qk682tk6UC/yg+Pe90QqC+oq+ 8yA+ynAYFK5GRZ+CtMIJA2FnnSy7Bw6yQhe5AuIX4/zVEf9Vv+uT90fvSsmjb2kjG/wS wGhfiIbohy9scmsPLLid6fqFOpjigd1DLW+c48kzYknTPck7Uzx/QJ3jwkXJw/5di+SU eKrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=78JseBZLc21ntG3MX/UCUXsNf1i9z8o0XIqeBwH4uvg=; b=nEynWdXAILcPwzsaI3r83wc2uTSegBiblUZp4gGTgJQBcLVYDSWVADDkFu9eGl32n2 gskJ6VpX1xTUeQ+rFylLvjTilvsMgvF0EKfB+TKgWbolIKbfBRUqiTU5kHJ3eEbPNkuk +7qAeqqU+xP4ZyLVnQCb3mTPOgWVTYAbabB8B8JFmzu/BuyxNCHZT/ZSEfFOPinRvxle XW+DIEmuQZSg53QlkN2dTDlsoyfxXzjfLAqXmC4U8hHWRkUsISaHY7zHClWZEaz05ZnB CBxNG/0NFvuC9OTpI9yxd36SDahREaUmqMR1CcTa7PsYM0+9lVwpeQYWDiaMo+jpQEq4 Omqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RPBurPeB; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si19613906pfy.169.2018.09.11.01.36.51; Tue, 11 Sep 2018 01:36:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RPBurPeB; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbeIKNfF (ORCPT + 3 others); Tue, 11 Sep 2018 09:35:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:52376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726517AbeIKNfF (ORCPT ); Tue, 11 Sep 2018 09:35:05 -0400 Received: from localhost.localdomain (unknown [171.76.126.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2221720870; Tue, 11 Sep 2018 08:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536655010; bh=PtCuXlnwF2Ru6PdDJYz8Pc4AfSe+fa4pBcnW3ZVSPTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPBurPeBzRA7ljePzqwN5jtn7peuzJC4TAfC5Dx4IjIZKdwspVU2GjUDidyNMF1Z7 XWtiJpxcIj31G5VJ2ypiaeKyvlZlCHgeGIZvbY1Unqt/zAJh9014pYWqu+Rg8IT1Nr CB8axITy8XvRwyLpXEdWryWRK40rOlR+MOVr8y4w= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Vinod Koul Subject: [PATCH 12/12] dmaengine: mmp_tdma: remove dma_slave_config direction usage Date: Tue, 11 Sep 2018 14:05:36 +0530 Message-Id: <20180911083536.16482-13-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180911083536.16482-1-vkoul@kernel.org> References: <20180911083536.16482-1-vkoul@kernel.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: Vinod Koul --- drivers/dma/mmp_tdma.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) -- 2.14.4 diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 13c68b6434ce..c14f8820a567 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c @@ -116,6 +116,7 @@ struct mmp_tdma_chan { u32 burst_sz; enum dma_slave_buswidth buswidth; enum dma_status status; + struct dma_slave_config slave_config; int idx; enum mmp_tdma_type type; @@ -139,6 +140,10 @@ struct mmp_tdma_device { #define to_mmp_tdma_chan(dchan) container_of(dchan, struct mmp_tdma_chan, chan) +static int mmp_tdma_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *dmaengine_cfg); + static void mmp_tdma_chan_set_desc(struct mmp_tdma_chan *tdmac, dma_addr_t phys) { writel(phys, tdmac->reg_base + TDNDPR); @@ -442,6 +447,8 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic( if (!desc) goto err_out; + mmp_tdma_config_write(chan, direction, &tdmac->slave_config); + while (buf < buf_len) { desc = &tdmac->desc_arr[i]; @@ -495,7 +502,18 @@ static int mmp_tdma_config(struct dma_chan *chan, { struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); - if (dmaengine_cfg->direction == DMA_DEV_TO_MEM) { + memcpy(&tdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg)); + + return 0; +} + +static int mmp_tdma_config_write(struct dma_chan *chan, + enum dma_transfer_direction dir, + struct dma_slave_config *dmaengine_cfg) +{ + struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); + + if (dir == DMA_DEV_TO_MEM) { tdmac->dev_addr = dmaengine_cfg->src_addr; tdmac->burst_sz = dmaengine_cfg->src_maxburst; tdmac->buswidth = dmaengine_cfg->src_addr_width; @@ -504,7 +522,7 @@ static int mmp_tdma_config(struct dma_chan *chan, tdmac->burst_sz = dmaengine_cfg->dst_maxburst; tdmac->buswidth = dmaengine_cfg->dst_addr_width; } - tdmac->dir = dmaengine_cfg->direction; + tdmac->dir = dir; return mmp_tdma_config_chan(chan); }