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