From patchwork Sun Apr 24 17:27:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 565625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A8BEC433EF for ; Sun, 24 Apr 2022 17:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236241AbiDXRbG (ORCPT ); Sun, 24 Apr 2022 13:31:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbiDXRbF (ORCPT ); Sun, 24 Apr 2022 13:31:05 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0819A14AAEB; Sun, 24 Apr 2022 10:28:04 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 66C2F5C017D; Sun, 24 Apr 2022 13:28:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 24 Apr 2022 13:28:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1650821283; x=1650907683; bh=gL LJXvPow1EyaPPDjH9fdOoNOR+1/wWYRGyiSoUxs+o=; b=FBiV7wxx+kBiVJhw2U 0nRo8+CDjUOHCyi5GqiRsWvwOig/uYHw1SlQBbZX/iXWCKJKPI2yRxePjoRjiFb8 AuCykvcWThzH0gCEts2FzQj7rR9JFMmqSj7T/GEL2GVelwztcc/+q5Z1xCWVGLNo e0idrdtcZi11zWn++NIGIPPijXKKJDX55pcux2oLXK511IhlipsnDJjn8DZSqQLh mYdF8Y2ldSE6LYE1fnS2+XbUztwulNXvbH5mgMhuG6LfFoWcK/VuFbaCojfK8meD ckIFqiP9vntIpKcVvpoy6Ko+uKloWFyuJIVH9VXOskhi7pNvz+De+4fpdVmUHdw5 6kYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650821283; x=1650907683; bh=gLLJXvPow1EyaPPDjH9fdOoNOR+1/wWYRGy iSoUxs+o=; b=pOuiUpJw2LCW2hxJZeEPCCiZskRIeJvHr8tHUqpFVMCXzoOPk+p qd7VA6xlZHvsI5ubofpt4YX/5MerC/hMV7J0tsw6Hf8UHHB+qd1hu1q4gqp6nUxv E9nQpN3nWntW9rsysxl5ale3AoBGmh7TZjLoixtubltRZ5C4KLK0ltOZQJFWmCFw BulYuOLhE5kuV8POEG9/obxDFHW1mYA66KsWOyTbEyeRLlMoHL53rH4Hu1Aiilib eeu1Kh6W/c8f4WHX5EiV9wyNg1DSEt+0tfsErjWqHEnVpXsb2H1ZlpB9dykPAKdJ BEGFDzX/vpptylkiq/i0za2IfYJsrUnGcgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtdelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Apr 2022 13:28:02 -0400 (EDT) From: Samuel Holland To: Vinod Koul , dmaengine@vger.kernel.org Cc: Samuel Holland , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Maxime Ripard , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Rob Herring , Maxime Ripard Subject: [PATCH v3 1/4] dt-bindings: dma: sun50i-a64: Add compatible for D1 Date: Sun, 24 Apr 2022 12:27:55 -0500 Message-Id: <20220424172759.33383-2-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424172759.33383-1-samuel@sholland.org> References: <20220424172759.33383-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org D1 has a DMA controller similar to the one in other Allwinner SoCs. Add its compatible, and include it in the list of variants with a separate MBUS clock gate. Acked-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Samuel Holland --- (no changes since v1) .../bindings/dma/allwinner,sun50i-a64-dma.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml index b6e1ebfaf366..ff0a5c58d78c 100644 --- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml +++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml @@ -20,9 +20,11 @@ properties: compatible: oneOf: - - const: allwinner,sun50i-a64-dma - - const: allwinner,sun50i-a100-dma - - const: allwinner,sun50i-h6-dma + - enum: + - allwinner,sun20i-d1-dma + - allwinner,sun50i-a64-dma + - allwinner,sun50i-a100-dma + - allwinner,sun50i-h6-dma - items: - const: allwinner,sun8i-r40-dma - const: allwinner,sun50i-a64-dma @@ -58,6 +60,7 @@ if: properties: compatible: enum: + - allwinner,sun20i-d1-dma - allwinner,sun50i-a100-dma - allwinner,sun50i-h6-dma From patchwork Sun Apr 24 17:27:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 565624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73333C433F5 for ; Sun, 24 Apr 2022 17:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236603AbiDXRbI (ORCPT ); Sun, 24 Apr 2022 13:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236540AbiDXRbG (ORCPT ); Sun, 24 Apr 2022 13:31:06 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D65E114AADC; Sun, 24 Apr 2022 10:28:05 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 463995C00FF; Sun, 24 Apr 2022 13:28:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 24 Apr 2022 13:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1650821285; x=1650907685; bh=pI 0+xczgj9HddQyvNbQNgf/Wfc3FJNTjyj7iSZol1+M=; b=llu6M6Fn/i/c82i7lR Qa7p1yspcKaLcuDmMDHAuNG0uUZGTgzHA6NuvOODCqtFbIpLLOubmwnqC/YEe/RW j8MdG3R/G4OGCajnmCaO9vJZnUcW0103PAWXHNVKfzSD09tIa/q1vsr2wat8qsSM S++f9d2bq/dI7NzQemlHn1oQj/jNbflVr6S+7+961Z9za1KT2+2jVuUdPt/Sf41h 9OIxlESn6T7Rg88Tt2UtYUwJMXb0/GgByjnrY+W/cw1rlI82m384s76nKzIwIUqA yR/jbvqa+M6yxiszs+MZEhAr3bS42AZl8muVmiDfP8Pkrpev6toMAc0qURzfQSO3 /Eig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650821285; x=1650907685; bh=pI0+xczgj9HddQyvNbQNgf/Wfc3FJNTjyj7 iSZol1+M=; b=j+0Qg41KoUB3K9eML1A26l6UXCykrN2VzUJZEJVoU01V3jGvDva Tfr5c3qebt+ygWliuKJf+ReCwuaR+5XMlqnqOEXYdxvB0ox5QMIww51X0i+BZPvd opESplhvlUL9Ms/gCNcTINtslwwzK7yEL96NauiQn94W5EHetaaK4/ASRBhgpMLn TV1ykqkP1gJpMUUcpbpAz66vx1mmuQRvtO88/YZD8TM18KKgRpYrC2ZamivYHnyR vcSxY/o6tNbf7c2PKz8s/jXIOEGUnlCog2QtJ9BUAEj3EIhfiBpU2dMUeMm21SlM lwutUWFeGjPJtEGRODDHGyWvBlEOGHmBk1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtdelgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Apr 2022 13:28:04 -0400 (EDT) From: Samuel Holland To: Vinod Koul , dmaengine@vger.kernel.org Cc: Samuel Holland , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Maxime Ripard , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Maxime Ripard Subject: [PATCH v3 2/4] dmaengine: sun6i: Do not use virt_to_phys Date: Sun, 24 Apr 2022 12:27:56 -0500 Message-Id: <20220424172759.33383-3-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424172759.33383-1-samuel@sholland.org> References: <20220424172759.33383-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This breaks on RISC-V, because dma_pool_alloc returns addresses which are not in the linear map. Instead, plumb through the physical address which is already known anyway. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland --- Changes in v3: - Fix format warnings drivers/dma/sun6i-dma.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 5cadd4d2b824..4436fbd70445 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -241,9 +241,7 @@ static inline void sun6i_dma_dump_com_regs(struct sun6i_dma_dev *sdev) static inline void sun6i_dma_dump_chan_regs(struct sun6i_dma_dev *sdev, struct sun6i_pchan *pchan) { - phys_addr_t reg = virt_to_phys(pchan->base); - - dev_dbg(sdev->slave.dev, "Chan %d reg: %pa\n" + dev_dbg(sdev->slave.dev, "Chan %d reg:\n" "\t___en(%04x): \t0x%08x\n" "\tpause(%04x): \t0x%08x\n" "\tstart(%04x): \t0x%08x\n" @@ -252,7 +250,7 @@ static inline void sun6i_dma_dump_chan_regs(struct sun6i_dma_dev *sdev, "\t__dst(%04x): \t0x%08x\n" "\tcount(%04x): \t0x%08x\n" "\t_para(%04x): \t0x%08x\n\n", - pchan->idx, ®, + pchan->idx, DMA_CHAN_ENABLE, readl(pchan->base + DMA_CHAN_ENABLE), DMA_CHAN_PAUSE, @@ -385,17 +383,16 @@ static void *sun6i_dma_lli_add(struct sun6i_dma_lli *prev, } static inline void sun6i_dma_dump_lli(struct sun6i_vchan *vchan, - struct sun6i_dma_lli *lli) + struct sun6i_dma_lli *v_lli, + dma_addr_t p_lli) { - phys_addr_t p_lli = virt_to_phys(lli); - dev_dbg(chan2dev(&vchan->vc.chan), - "\n\tdesc: p - %pa v - 0x%p\n" + "\n\tdesc:\tp - %pad v - 0x%p\n" "\t\tc - 0x%08x s - 0x%08x d - 0x%08x\n" "\t\tl - 0x%08x p - 0x%08x n - 0x%08x\n", - &p_lli, lli, - lli->cfg, lli->src, lli->dst, - lli->len, lli->para, lli->p_lli_next); + &p_lli, v_lli, + v_lli->cfg, v_lli->src, v_lli->dst, + v_lli->len, v_lli->para, v_lli->p_lli_next); } static void sun6i_dma_free_desc(struct virt_dma_desc *vd) @@ -445,7 +442,7 @@ static int sun6i_dma_start_desc(struct sun6i_vchan *vchan) pchan->desc = to_sun6i_desc(&desc->tx); pchan->done = NULL; - sun6i_dma_dump_lli(vchan, pchan->desc->v_lli); + sun6i_dma_dump_lli(vchan, pchan->desc->v_lli, pchan->desc->p_lli); irq_reg = pchan->idx / DMA_IRQ_CHAN_NR; irq_offset = pchan->idx % DMA_IRQ_CHAN_NR; @@ -670,7 +667,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_memcpy( sun6i_dma_lli_add(NULL, v_lli, p_lli, txd); - sun6i_dma_dump_lli(vchan, v_lli); + sun6i_dma_dump_lli(vchan, v_lli, p_lli); return vchan_tx_prep(&vchan->vc, &txd->vd, flags); @@ -746,14 +743,16 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( } dev_dbg(chan2dev(chan), "First: %pad\n", &txd->p_lli); - for (prev = txd->v_lli; prev; prev = prev->v_lli_next) - sun6i_dma_dump_lli(vchan, prev); + for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli; + p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next) + sun6i_dma_dump_lli(vchan, v_lli, p_lli); return vchan_tx_prep(&vchan->vc, &txd->vd, flags); err_lli_free: - for (prev = txd->v_lli; prev; prev = prev->v_lli_next) - dma_pool_free(sdev->pool, prev, virt_to_phys(prev)); + for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli; + p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next) + dma_pool_free(sdev->pool, v_lli, p_lli); kfree(txd); return NULL; } @@ -820,8 +819,9 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic( return vchan_tx_prep(&vchan->vc, &txd->vd, flags); err_lli_free: - for (prev = txd->v_lli; prev; prev = prev->v_lli_next) - dma_pool_free(sdev->pool, prev, virt_to_phys(prev)); + for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli; + p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next) + dma_pool_free(sdev->pool, v_lli, p_lli); kfree(txd); return NULL; } From patchwork Sun Apr 24 17:27:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 565623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E71CCC433FE for ; Sun, 24 Apr 2022 17:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236638AbiDXRbO (ORCPT ); Sun, 24 Apr 2022 13:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236597AbiDXRbK (ORCPT ); Sun, 24 Apr 2022 13:31:10 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2BEE14AAF3; Sun, 24 Apr 2022 10:28:09 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0F01C5C017E; Sun, 24 Apr 2022 13:28:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 24 Apr 2022 13:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1650821289; x=1650907689; bh=HV olP6ZkMyb65XG1QvbeY08lLQkAYv1LBjKVDIgum5k=; b=YJ+7dCtdDGuT9u3w5g 5qjQiu9grty/l+q8FCL3g/SAefYxN4xDgAOXAqfVG29eNasMrYScvpXlqtONbjpJ 7Mhf7uBXBjYVViSrst0u15HsOhe7mloWQ8JFmfdKtaswVo7yh53NnjpzhHdDnZve fGjSqIY/lbMqIihq3sPS4RZAQTQEmZS3mP68H7YpW1bQmo7pHUdfBdWPOwHK0hr2 Fdp6z5L14lpxyFs2qncBp1oYJwIULb8HAKTvRb0zuZUox8X+hrn4IRKqSBP2gi5L z7pV4OdAm7TZWfaQI5ILRNyAsVJicQNYbZmjuHGusIRWMr/+lBVpi4C7TgWreaBs VeHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650821289; x=1650907689; bh=HVolP6ZkMyb65XG1QvbeY08lLQkAYv1LBjK VDIgum5k=; b=sXHT+ylENl6l8k7rlDj9Ox832v31yLcMK4oGuAZ8+YYaCF6awLb eDgvCKo2M6Dvl1hpUGYIcOG0lA0pjZSRf44YLZFZ+th7FwK6y/S/3YlaqjjFmji9 RDDiHSMJvCBnrz97iBn6UeoNXd+RfLezQx3lStqRUgrChPAGoRizgimejzEGYVaI KEg0fOW1sBk4lg2yaAJCyQoDHqquRVZgm1tU5gpOTLQPfsQsICgtBwvD1ZhFjMVy 7qze4h3E2uboe2rmMNgbXCmdT9MjCSFZShxzjzXApyUVugCCMLs8wjOwrNaZsOtB w7f3g+NmiMxmqlXbaoCdDUYqaLNiC0gCS/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtdelgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Apr 2022 13:28:08 -0400 (EDT) From: Samuel Holland To: Vinod Koul , dmaengine@vger.kernel.org Cc: Samuel Holland , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Maxime Ripard , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Maxime Ripard Subject: [PATCH v3 4/4] dmaengine: sun6i: Add support for the D1 variant Date: Sun, 24 Apr 2022 12:27:58 -0500 Message-Id: <20220424172759.33383-5-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424172759.33383-1-samuel@sholland.org> References: <20220424172759.33383-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org So far it appears to match the configuration of the A100 variant. Since D1 is a RISC-V chip, it does not meet any of the existing dependencies for this driver, so relax the dependency somewhat. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland --- (no changes since v1) drivers/dma/Kconfig | 2 +- drivers/dma/sun6i-dma.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index d5de3f77d3aa..b6845303cf7e 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -163,7 +163,7 @@ config DMA_SUN4I config DMA_SUN6I tristate "Allwinner A31 SoCs DMA support" - depends on MACH_SUN6I || MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST + depends on ARCH_SUNXI || COMPILE_TEST depends on RESET_CONTROLLER select DMA_ENGINE select DMA_VIRTUAL_CHANNELS diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 1eb3bafa7324..b7557f437936 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1271,6 +1271,7 @@ static const struct of_device_id sun6i_dma_match[] = { { .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 }, + { .compatible = "allwinner,sun20i-d1-dma", .data = &sun50i_a100_dma_cfg }, { .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg }, { .compatible = "allwinner,sun50i-a100-dma", .data = &sun50i_a100_dma_cfg }, { .compatible = "allwinner,sun50i-h6-dma", .data = &sun50i_h6_dma_cfg },