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;