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;