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; }