From patchwork Fri Jun 22 03:24:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 139564 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp362148lji; Thu, 21 Jun 2018 20:24:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKyd0t36ET8GqPkRDILzLB2Y7scX020uvS0Bz1N2GA0vAuV9ggLo+zET8adJpzRy22ufyPm X-Received: by 2002:a62:f5da:: with SMTP id b87-v6mr30200950pfm.113.1529637882967; Thu, 21 Jun 2018 20:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529637882; cv=none; d=google.com; s=arc-20160816; b=nJ8JyvBUJOHDlxljwsjn8/9WU+i/gEguOeDZax7wo9x6PscU626MBOBBmvavzGOPbK o8PHmIB3YVvzrbj7zsJkrBYknCABF6fylJgDhMaGpEOPCGjxSplVmQLOsfdT7Zi/xNLh sXlzUckXMbDB/bh83zD18fYxxz0XqObWrsLYgMWrxzuAXGdRfZ4cq4yUgV0gxzZfrHOC 5uGxAu+315jckXvevOZQ+OeOYjWzqhpya0RINg8hi11bGeBpFeRaV2hwJBrX4suY7htO O6iB2Z9hlWToAj+I0jR8yarlerLTpvEwQxSTcO8B2YFZkd6gnV9jWECofDYw+4MLVKqH Lqlw== 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:arc-authentication-results; bh=4r/kp75gRHhgePw3hxi6Cv5BAONK/+C7nyCuBwUB6eM=; b=m2RjraYAzlnsk5k+akXs58vc1TJoCn314usUnc5h7XSKl+QrXK5jZHssm2BAY1P9mL eXw6n8r29Ict1mEEXf6knVJXs7a5b6JG9PEp3I8YdFx+NjDRG255ar0P+CAkwA3zocBE RsQmn1VDmaNUK3bDAzGYX9C+TWXRhBc+a8jTORvRZMBNp6weYGjIZSgzOEztTp6MlwBi WqG9IKSDPwMTDf2jMK4xwHddoAjIGQbw9UomxNvZDu7AHWfzm1p/Ym1qOd6ji/MJmKk5 zsDwVjBadxlBA5fVeu4HwThYfqDNF+g9/9ZtmEZBggt6m5WFjRCDJunc+aJVXgHJn/SN MRMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hg8toVuA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89-v6si6366474plf.224.2018.06.21.20.24.42; Thu, 21 Jun 2018 20:24:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=Hg8toVuA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934350AbeFVDYk (ORCPT + 30 others); Thu, 21 Jun 2018 23:24:40 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:33575 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934322AbeFVDYg (ORCPT ); Thu, 21 Jun 2018 23:24:36 -0400 Received: by mail-pl0-f66.google.com with SMTP id 6-v6so2752716plb.0 for ; Thu, 21 Jun 2018 20:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4r/kp75gRHhgePw3hxi6Cv5BAONK/+C7nyCuBwUB6eM=; b=Hg8toVuAgiLhpCj7N5UbfwHLVP1as3HFPNLOEjFfTg7m3+0sYQKa/t1rtsiioIvlR8 qZjHvjDjvkfKytnXhNTS1snywbeNX9tNPEYZZqUrUIMv5bPnLK7/DpKxJIoYjNt/OePm q5t2+wypPZVfU3iM9Iwar1ll0bSrh6dxqdSS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4r/kp75gRHhgePw3hxi6Cv5BAONK/+C7nyCuBwUB6eM=; b=SwOOk1BHYnghy9flatzEEpLAQRzzELAVnqsVhOYAoEGOvtqmxV2e0PltINyzpmJfCE ilBBNT2q+tNuiiqDjkZpITVk4HWKMaYEv2JeeY9rRj9ORH3DrYZ1x+Bvy2c/C/eJ90CB 8jGMobs3foOXna3e2qzf86W1lOcmNXw8bGMIg0fwY0znMsbSnB9pYWjWK/2Delo6ZQAN r31sjtkFAGZNOYCD+UdX4+vVEsx/C0z0U57XYJ2GhP52qpYLmqb8IBiNGFtJGl3weO7p 31MLyLu0jErKjgg5ZoKq5yXMJIjJIRBgWtY8zTyPk2dNInMTFa5J6klk+kdb+nGLBSin Icjw== X-Gm-Message-State: APt69E2FNxbtkWd2OgxyEGhhA/byVv6xC9OEzdezL2upF6TdJvVuRzyj qPtx/X/jTA3K4lBBdqbKQNl52A== X-Received: by 2002:a17:902:585c:: with SMTP id f28-v6mr31416258plj.206.1529637875741; Thu, 21 Jun 2018 20:24:35 -0700 (PDT) Received: from localhost.localdomain ([45.56.155.153]) by smtp.gmail.com with ESMTPSA id a23-v6sm9286253pfn.113.2018.06.21.20.24.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 20:24:35 -0700 (PDT) From: Guodong Xu To: vkoul@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, dan.j.williams@intel.com Cc: liyu65@hisilicon.com, suzhuangluan@hisilicon.com, xuhongtao8@hisilicon.com, zhongkaihua@huawei.com, xuezhiliang@hisilicon.com, xupeng7@huawei.com, sunliang10@huawei.com, fengbaopeng@hisilicon.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: k3dma: add optional property dma_min_chan Date: Fri, 22 Jun 2018 11:24:14 +0800 Message-Id: <20180622032416.20133-2-guodong.xu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622032416.20133-1-guodong.xu@linaro.org> References: <20180622032416.20133-1-guodong.xu@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li Yu Add optional property dma_min_chan for k3dma. Signed-off-by: Li Yu --- Documentation/devicetree/bindings/dma/k3dma.txt | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt index 4945aeac4dc4..2fa1370c3173 100644 --- a/Documentation/devicetree/bindings/dma/k3dma.txt +++ b/Documentation/devicetree/bindings/dma/k3dma.txt @@ -12,6 +12,11 @@ Required properties: have specific request line - clocks: clock required +Optional properties: +- dma_min_chan: the minimum number of DMA channel which begin to use + the default value is 0, but in some platform is + configured 1, like hi3660 platform + Example: Controller: @@ -21,6 +26,7 @@ Controller: #dma-cells = <1>; dma-channels = <16>; dma-requests = <27>; + dma_min_chan = <1>; interrupts = <0 12 4>; clocks = <&pclk>; }; From patchwork Fri Jun 22 03:24:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 139565 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp362222lji; Thu, 21 Jun 2018 20:24:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL/JwhkqIryGCf3b4SvbmJA2bsk4SDji0B7ZcduOAA+IIDpVoMAqIblh1DQ7X77TcemRKKY X-Received: by 2002:a63:bd51:: with SMTP id d17-v6mr8249418pgp.42.1529637892788; Thu, 21 Jun 2018 20:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529637892; cv=none; d=google.com; s=arc-20160816; b=pHthFjqZgxelaSzOlRoKxeYVPeREIpdw8GSckmsttk1kMglkZ+dDaWFgZFlMhrckqh AInhZE7+hc5+RF4dy/ZkwTeOgr6F3lLJwkItumoGbtH1qs+df0M1i6ep0tWvDjNNmQ1o 4kwUbp5Kyvkp1CMiMZVznLrn+ZNTWXHMSH7cZ9fndl624hWDs+fCJa6q+szmSiUehxJC GXL91C7EAz4XTtY6MCpN+J2oeVHcNsXyMck3J/TCpDE6bfHBgxhHajMPtXFw+HFQ7WHh AXPrNTI07elgebzRsdmBdejf4Lgvnz0OQlfORHU/t0vfwfwqqlGFYzZCVIvjtFrYtsOh JX4Q== 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:arc-authentication-results; bh=+TGsoxWDLx0eUmV2mltgdZ45P5o8tIzkTFsYHg4OQtk=; b=AZLhuqO5dCLVlnTGrcamdp8Ctr8zyw3iGEu33eN11wjU5/BeylGJZEQ79/AC8j2sbv Dh2G55mCwL3GuxNb9gnr1+xcm3WQF8COWNPA2j8crjPTZC1V8lh8SxcXKAAF4KlQIXnZ TPbv1JGxQDcPbTuCDuotEUJ4nrTsAH9pPD0gjpYzYMSXEDsR3GzamWabCOUhsYXmo4i7 Fic0EOoLVnEVc6UHSbfN08APXasKjba1aWBWV46v5TbVERqVCiQ8Qx89oXp6g/wgxeou ElJfc/reK9QpIHrfpZnYvdOMevAIWanst+y7b8+sFjZoafbM7JAe45rIly5XUP2HS7XN S9cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=chNCEB6s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba7-v6si6405981plb.490.2018.06.21.20.24.52; Thu, 21 Jun 2018 20:24:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=chNCEB6s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934371AbeFVDYo (ORCPT + 30 others); Thu, 21 Jun 2018 23:24:44 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:41480 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934351AbeFVDYl (ORCPT ); Thu, 21 Jun 2018 23:24:41 -0400 Received: by mail-pl0-f65.google.com with SMTP id w8-v6so2746830ply.8 for ; Thu, 21 Jun 2018 20:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+TGsoxWDLx0eUmV2mltgdZ45P5o8tIzkTFsYHg4OQtk=; b=chNCEB6sm09PWStU9jTmEJfkARLnMmFnIs3LWB96Ywi5xtXH5QD1kZmuLICKkG/YUr 9JDMDEMkYhwGSrFr8hhXi8S45xfv4vl4beRKRE2kKx7cKATL8CPRPSnQumlicFK49Dbc xcbO7o3b0TP7xQU85XLQZcIswV33L6Z4izJSk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+TGsoxWDLx0eUmV2mltgdZ45P5o8tIzkTFsYHg4OQtk=; b=bn22tSPjr50i3DyeDUFLNfe1tcxFAE9RwnMnp+V0fIO76Mn3kD2uF6P/LU26ojwF8T Dh39v96mud7Mg6nyy8qWqK6lQXe+Y1R8OFpBqi/YUyY81xmR9JOtqcHs8OvlNh4t1bUi Fp+xJD2v4F4KQMiKFIKvt8VwKqJzm/0RzZXEB+n0RubXQMTdG28CkoG37LWgN+b2ns1R YSLEijsQqYpOgQaWgTiqZXIy5CO8ppXxfYsgQnwOSuJ1cmU86VdmpiVZOZfxRk2t0HTc OnaWc58VYSlu8Dj3PWXT9EkXG3OzB5ulE8O2x4bzS4OFPtHbd6bM4s37fuGUSl0eY1M0 HYvw== X-Gm-Message-State: APt69E3mWseUESHO5mtAlAjIyIk6CJSucXgdplrnbinZMqNjfzKNxJDo plUazkv+ordoWeHce/Sfr9h3LA== X-Received: by 2002:a17:902:2983:: with SMTP id h3-v6mr31419435plb.232.1529637880909; Thu, 21 Jun 2018 20:24:40 -0700 (PDT) Received: from localhost.localdomain ([45.56.155.153]) by smtp.gmail.com with ESMTPSA id a23-v6sm9286253pfn.113.2018.06.21.20.24.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 20:24:40 -0700 (PDT) From: Guodong Xu To: vkoul@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, dan.j.williams@intel.com Cc: liyu65@hisilicon.com, suzhuangluan@hisilicon.com, xuhongtao8@hisilicon.com, zhongkaihua@huawei.com, xuezhiliang@hisilicon.com, xupeng7@huawei.com, sunliang10@huawei.com, fengbaopeng@hisilicon.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guodong Xu Subject: [PATCH 2/3] k3dma: add support to reserved minimum channels Date: Fri, 22 Jun 2018 11:24:15 +0800 Message-Id: <20180622032416.20133-3-guodong.xu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622032416.20133-1-guodong.xu@linaro.org> References: <20180622032416.20133-1-guodong.xu@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li Yu On k3 series of SoC, DMA controller reserves some channels for other on-chip coprocessors. By adding support to dma_min_chan, kernel will not be able to use these reserved channels. One example is on Hi3660 platform, channel 0 is reserved to lpm3. Please also refer to Documentation/devicetree/bindings/dma/k3dma.txt Signed-off-by: Li Yu Signed-off-by: Guodong Xu --- drivers/dma/k3dma.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index fa31cccbe04f..13cec12742e3 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -113,6 +113,7 @@ struct k3_dma_dev { struct dma_pool *pool; u32 dma_channels; u32 dma_requests; + u32 dma_min_chan; unsigned int irq; }; @@ -309,7 +310,7 @@ static void k3_dma_tasklet(unsigned long arg) /* check new channel request in d->chan_pending */ spin_lock_irq(&d->lock); - for (pch = 0; pch < d->dma_channels; pch++) { + for (pch = d->dma_min_chan; pch < d->dma_channels; pch++) { p = &d->phy[pch]; if (p->vchan == NULL && !list_empty(&d->chan_pending)) { @@ -326,7 +327,7 @@ static void k3_dma_tasklet(unsigned long arg) } spin_unlock_irq(&d->lock); - for (pch = 0; pch < d->dma_channels; pch++) { + for (pch = d->dma_min_chan; pch < d->dma_channels; pch++) { if (pch_alloc & (1 << pch)) { p = &d->phy[pch]; c = p->vchan; @@ -825,6 +826,8 @@ static int k3_dma_probe(struct platform_device *op) "dma-channels", &d->dma_channels); of_property_read_u32((&op->dev)->of_node, "dma-requests", &d->dma_requests); + of_property_read_u32((&op->dev)->of_node, + "dma-min-chan", &d->dma_min_chan); } d->clk = devm_clk_get(&op->dev, NULL); @@ -848,12 +851,12 @@ static int k3_dma_probe(struct platform_device *op) return -ENOMEM; /* init phy channel */ - d->phy = devm_kcalloc(&op->dev, - d->dma_channels, sizeof(struct k3_dma_phy), GFP_KERNEL); + d->phy = devm_kcalloc(&op->dev, (d->dma_channels - d->dma_min_chan), + sizeof(struct k3_dma_phy), GFP_KERNEL); if (d->phy == NULL) return -ENOMEM; - for (i = 0; i < d->dma_channels; i++) { + for (i = d->dma_min_chan; i < d->dma_channels; i++) { struct k3_dma_phy *p = &d->phy[i]; p->idx = i; From patchwork Fri Jun 22 03:24:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 139566 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp362249lji; Thu, 21 Jun 2018 20:24:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJjbzke5qN/Qxgr3LYP/0iakeMHgGoek5st40Z1oPfzLBYGGcLqoqeU0XQ4NHp2lRAplCb6 X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr21747656plz.34.1529637895175; Thu, 21 Jun 2018 20:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529637895; cv=none; d=google.com; s=arc-20160816; b=awxuHRwRkP69AgTjrHsTGWke+a3UcJU6LJNn0dPjb3sO0jiyLno8+5+Xa85OT0/3JJ Tk2YTfvJ/uMnT0EuU1NGhz05xfP3sqXMLxsQ8zc3x7l3F4MRsPdHoqN5/LZU6JdJJFKv BlS/IEWElg/vdhhDO/RZGHvn5WXPtlZIld1RG2ItMkiD/bnDeeF7bFHWf6ipx26MTx3p HkVdQaphVc0jsmFaizN5E7rKbIBrnbF15vWy86R22SaO0IkKBqIwjzfVEzx45gj4pUKS 7ES9VBcIMNDEwul8SCcmSnidEmrXyD6IPBftRimGDvqMo/2Dh/yKZ7g65SrReZni4PGZ sAxw== 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:arc-authentication-results; bh=paUx3mbJ/fGKTrCzR9iWMd0cKrJ2DrCtPIBJlU27mGU=; b=qSIvOWqE8oGnQla/PoGJy7rttgw65TvnVE1Ae+GE6eHxu1X/n8DTnhG1X5x/qrwYB1 SATkgEOCBC2n/SfhR3zRJZ+wNsuyBi0j8unkBJiAy7hZVHGxvYW3LTVRs/L14SBXCnjg n5eEKqhr8bhqeHi40RYKSxqSZstxdljvUtQpd8mFdSN737QdKnfQNOjldTfJD08iHTWn PkOIC1DEXDtPoNHt8G3ASGFo4Rm16ZqFXwxrknnAJcgbqsT+xf1Fyw/MX6iMCNiJ959l syqEeKCTj+5uj0Bz/K9bQfpNhTxh/c/5DDlT8UgSS4pXEW+mOgwhf2znhQjsTp5GdEVn 9y/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQcFbwHd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si6919469pfa.38.2018.06.21.20.24.54; Thu, 21 Jun 2018 20:24:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=DQcFbwHd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934394AbeFVDYv (ORCPT + 30 others); Thu, 21 Jun 2018 23:24:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:41324 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934351AbeFVDYq (ORCPT ); Thu, 21 Jun 2018 23:24:46 -0400 Received: by mail-pf0-f196.google.com with SMTP id a11-v6so2503150pff.8 for ; Thu, 21 Jun 2018 20:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=paUx3mbJ/fGKTrCzR9iWMd0cKrJ2DrCtPIBJlU27mGU=; b=DQcFbwHdVjXgwNHsPmH/5+YmkRsdmeVOJf+ZekByCAcieL3gIrpms653HeFKzfHmbe zK7D1nY2PHQwPJLcsmnD4nqhIUQ9fJJrK5ml8ui8oQdrl4YmGZ52vSpzz87d/aLcSZxI rCdUgfL0BZ2t9X0ovS3oeC5RUHxWCli6Fw2ig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=paUx3mbJ/fGKTrCzR9iWMd0cKrJ2DrCtPIBJlU27mGU=; b=BtRAT/CpCHvtAX/H4vCVtWCi4QHlIy7qPcGc2KpLefpeZkn6WLNN900FadIGPazCYc xXW6KKMA/D8ThMUsWPVggVVmJo57jng3TjhrS90B72rcpoR/4l98OLNlNGOjbgnOTlz7 aPy6X+J2iSSa56ENR9cs7SN4bLR3/Rbltq+7ZTa4n+EAOOLnxme4n9tjyvKtArV2vHXO gxTzzDxraOe/g6PBtTZU0B8H/Vfqz0CY4sQ8L+/boVAX9yxQCRbxHUIQL9bnqkemUHhu HVNztxn09R4bLEltXikFawtV6p+SRrVqTpfS+kihYoLYTYTtyVlSh8Ctv6gGqHVRy6FW Vg9w== X-Gm-Message-State: APt69E1I8Tf4NFLBD6GiUk1JGS+vHQuSRoTgvhm25nad3HQT6In1E4In LuUOnGeYxU+KTXnHDW6sKK/TSw== X-Received: by 2002:a65:4146:: with SMTP id x6-v6mr24869475pgp.221.1529637886034; Thu, 21 Jun 2018 20:24:46 -0700 (PDT) Received: from localhost.localdomain ([45.56.155.153]) by smtp.gmail.com with ESMTPSA id a23-v6sm9286253pfn.113.2018.06.21.20.24.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 20:24:45 -0700 (PDT) From: Guodong Xu To: vkoul@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, dan.j.williams@intel.com Cc: liyu65@hisilicon.com, suzhuangluan@hisilicon.com, xuhongtao8@hisilicon.com, zhongkaihua@huawei.com, xuezhiliang@hisilicon.com, xupeng7@huawei.com, sunliang10@huawei.com, fengbaopeng@hisilicon.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guodong Xu Subject: [PATCH 3/3] k3dma: delete axi_config Date: Fri, 22 Jun 2018 11:24:16 +0800 Message-Id: <20180622032416.20133-4-guodong.xu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622032416.20133-1-guodong.xu@linaro.org> References: <20180622032416.20133-1-guodong.xu@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li Yu Axi_config controls whether DMA resources can be accessed in non-secure mode, such as linux kernel. The setting is actually done in bootloader stage. This patch removes axi_config from k3dma driver. Signed-off-by: Li Yu Signed-off-by: Guodong Xu --- drivers/dma/k3dma.c | 3 --- 1 file changed, 3 deletions(-) -- 2.17.1 diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 13cec12742e3..ddd7d1e054c0 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -52,8 +52,6 @@ #define CX_SRC 0x814 #define CX_DST 0x818 #define CX_CFG 0x81c -#define AXI_CFG 0x820 -#define AXI_CFG_DEFAULT 0x201201 #define CX_LLI_CHAIN_EN 0x2 #define CX_CFG_EN 0x1 @@ -158,7 +156,6 @@ static void k3_dma_set_desc(struct k3_dma_phy *phy, struct k3_desc_hw *hw) writel_relaxed(hw->count, phy->base + CX_CNT0); writel_relaxed(hw->saddr, phy->base + CX_SRC); writel_relaxed(hw->daddr, phy->base + CX_DST); - writel_relaxed(AXI_CFG_DEFAULT, phy->base + AXI_CFG); writel_relaxed(hw->config, phy->base + CX_CFG); }