From patchwork Sun Mar 5 13:37:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9604601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6096160414 for ; Sun, 5 Mar 2017 13:41:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51FC3283B3 for ; Sun, 5 Mar 2017 13:41:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45A9E2843F; Sun, 5 Mar 2017 13:41:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C9147283B3 for ; Sun, 5 Mar 2017 13:41:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xOXLBJkqyS8l+Wv1qUYDNxzzKPRzh5r06VW/KaxTVrA=; b=rFsAMpRlvzEaSmD3/sD+DW3zps LjqcJoSccp/mX3XrLeLM3HhcuGy4z+8797Ij3p4QbkNd9GcTt/bsjVpPCWOq7MOo4H0+flXsQXAru AiPJg4zjIb7FWiy0M8USaCpp87hzMp0omdX/ZFjpYyJWgG9YBlrI5Mopj34rkTVS8hY74HDr38vkQ L0yRZCzvlq1tw3JaKFsfK9uoHYm1gAZm4Mv9VGlT00vXc2Z0sR3cOzloOM38upvbxsN70Eo8aZrYv ClJOhLcY2OLHrn4Q9EWSxaaHyjCcZyLe+57gLyPPx6qeAOlCkUFkagm+/nTXQDytJA4bw8M2zV0pS GVsO92/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckWPh-0000DY-1L; Sun, 05 Mar 2017 13:41:29 +0000 Received: from forward8j.cmail.yandex.net ([5.255.227.109]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckWOr-0007go-4F for linux-arm-kernel@lists.infradead.org; Sun, 05 Mar 2017 13:40:39 +0000 Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward8j.cmail.yandex.net (Yandex) with ESMTP id 8ACE521DC3; Sun, 5 Mar 2017 16:40:13 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 665C563C0D8E; Sun, 5 Mar 2017 16:40:07 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1xu4bs3MBZ-dxTWIPLj; Sun, 05 Mar 2017 16:40:05 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1488721206; bh=ZBQlYuRGfMlq0kB86eg8GltAZhfI3XNQx4qFmp44BRc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=eo8uHZ8yA2uJgCTH0HRCEl267npebq9kk+lvMT0Jn2VGQAcehloZRbYK5MGYW+Mh/ HDNjvZDG0+qWJv0b3hN8ymgS6YiPkXKzyNhqTPgvZR9EoS4SaRYrax9Q/Vf9EwoWAO k0y6YvUseZnew0RlA7xTUDE3w/qly7MxOVEgjrrQ= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Vinod Koul , Rob Herring , Maxime Ripard , Chen-Yu Tsai , Mark Brown Subject: [PATCH v2 07/12] dmaengine: sun6i: support V3s SoC variant Date: Sun, 5 Mar 2017 21:37:04 +0800 Message-Id: <20170305133709.6288-8-icenowy@aosc.xyz> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170305133709.6288-1-icenowy@aosc.xyz> References: <20170305133709.6288-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170305_054037_387769_DDDA46FF X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner V3s has a DMA engine similar to the ones from A31, but with fewer channels and DRQs. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 + drivers/dma/sun6i-dma.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt index 6b267045f522..98fbe1a5c6dd 100644 --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt @@ -9,6 +9,7 @@ Required properties: "allwinner,sun8i-a23-dma" "allwinner,sun8i-a83t-dma" "allwinner,sun8i-h3-dma" + "allwinner,sun8i-v3s-dma" - reg: Should contain the registers base address and length - interrupts: Should contain a reference to the interrupt used by this device - clocks: Should contain a reference to the parent AHB clock diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 889fb24023cd..9565dcaa7651 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1031,11 +1031,24 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = { .nr_max_vchans = 34, }; +/* + * The V3s have only 8 physical channels, a maximum DRQ port id of 23, + * and a total of 24 usable source and destination endpoints. + */ + +static struct sun6i_dma_config sun8i_v3s_dma_cfg = { + .nr_max_channels = 8, + .nr_max_requests = 23, + .nr_max_vchans = 24, + .gate_needed = true, +}; + static const struct of_device_id sun6i_dma_match[] = { { .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg }, { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg }, { .compatible = "allwinner,sun8i-a83t-dma", .data = &sun8i_a83t_dma_cfg }, { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg }, + { .compatible = "allwinner,sun8i-v3s-dma", .data = &sun8i_v3s_dma_cfg }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun6i_dma_match);