From patchwork Mon Apr 11 04:46:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808529 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D919C433F5 for ; Mon, 11 Apr 2022 04:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yRsNLITPBySmy5ptyQBmfAZTN84/fNokxZQ2zdooQiY=; b=3DqGaOjH8A41Zj Idr7yIYvb+l3Q2qHk1+TUNcv41qkM8QmJ3v2zU4rH4gB2Icf4s32KewhGyYv6TnocWKw995QIInyP rDL2QwW5t6MUKAikhuDhET01eDwozKN5svt9UKeWqXz9ww0/FRIjE3BirNbTpMQVAbvgzzzBeTTyG FhWRdwc7w++KV118jf1OcAtdK+8u/GC8G+2EQoInaY/3wt7vjRdVOcYnT/ydRr5n4ba+p9WCbY2RB 56aOvfFhxqHOs7VIgmoEjLgtSgb6WAkO5H6utFy/F56eVCU/tUS/LQIBMDskXLfRa7G1Vu3FwoPuA 8ik2+j7Yx7qL34Vw4QVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlwv-006eGR-CZ; Mon, 11 Apr 2022 04:46:49 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlwm-006eD3-0O for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:46:41 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 99FF13200EAD; Mon, 11 Apr 2022 00:46:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 11 Apr 2022 00:46:39 -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=1649652398; x=1649738798; bh=gL LJXvPow1EyaPPDjH9fdOoNOR+1/wWYRGyiSoUxs+o=; b=uWTJmjUG7vENZM/afU 2cf4iOilAoGPRqbcBRu9ALpyB+eHsRT3ogDmEs8uFt7BDGU2xC47oUSztbuatPOD +3lP+SeSp/iJAiE3dHlBMRNuNdj3K3ZXRZ+D6ziSx4m0zqmjrCzzZYT1PG/ukEg4 CxAIJSq8RqRih8ookNt1kSdZHZxzmWQi+nFKgDIIW3uMBhBHfTsvVXsaRpxLo/SZ MASlC3srIL7d7P0T/CxW6cfKJwJ6D1hR75FHx3K+TeKBlmhgsKXb1hDzh1eSTAaZ bK2JH6v0RUETxf3phCNA3D9JaJLPcFBy8TCvIh7fk+qooACm3UcqTCAoizfX+cNq G8iQ== 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=fm3; t= 1649652398; x=1649738798; bh=gLLJXvPow1EyaPPDjH9fdOoNOR+1/wWYRGy iSoUxs+o=; b=TOgUOZFimHb6KQFyoo1Lux1Vg5FMdsusJtXa0PUvaUs2Zx5xwXx wme4enkIaFsIM2ytdb1D1SliqBw8yhx76ryP3rnSvY1VTwYi6hZsnAsR+iWrywQ4 CBKP486DUZV9xE8P+wTF4DtAAXPmaTQ9q7VHltEczNQw5XMJqJlOgvqDyEqa2IIM Nfz0aoAbAOO0hCDx5WKQ2Vt+k4TyjXe+70mzEtovRHP18PThRO2XXjzq7Da85Te3 prXbvlh/AaGmRU246Z9Ns3GgKE6twHKthNNRnHZgLFVuap281okkC/cU1E3fKde0 XVbohtlgj1m3qjhK9rdurYHKejLtUNAUUUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:46:37 -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 v2 1/4] dt-bindings: dma: sun50i-a64: Add compatible for D1 Date: Sun, 10 Apr 2022 23:46:29 -0500 Message-Id: <20220411044633.39014-2-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411044633.39014-1-samuel@sholland.org> References: <20220411044633.39014-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_214640_109312_C28888A2 X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Mon Apr 11 04:46:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808530 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C28AFC433F5 for ; Mon, 11 Apr 2022 04:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QAqKbr+Qf3ooDre0ou4NEX19x3Y4ESYl9ov7c5+nmv4=; b=ajNT7sQeUnPLfY UpD/hWv03bwWBX4dL3tMqkb2bUvfk8T7U4nZnLAZSptyEk1nRiuoOwfx47fYS6BRo+kmpZKRu67ct Xw3O/17qsG1uLAa5abJOnirpWTbaRUFZUqvWwz525AGTmK4bOjmq+Cy/eK8rc8wz5g5+B/ReehR39 1e1Z4024Li29pafGmrf++5bscvwtrUeBjXdvZUwieUvFLIAvuACTEIF4Q9bzOuoL0XnQ6r9JRDL8g yyRcW5Acwe9tagQGaPhW1RKyU6and7OxQq3zoDvYjpkzJQiHp90/RDu6CgiHDF6t0DJYcnApJSj2V W4eukQKPrh5YOx/7qgIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlx8-006eMX-FQ; Mon, 11 Apr 2022 04:47:02 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlwp-006eDm-1A for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:46:44 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B8F403200993; Mon, 11 Apr 2022 00:46:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 11 Apr 2022 00:46:42 -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=1649652401; x=1649738801; bh=mB +nLCZ+L9sywRzCC2aZPrLE0+qzIdPX9BHY90NKeFs=; b=X0n6WLnlSy1Fsem0KT Ftu/US7pYvSd7gNGQ3OYU46BQqY/JrdWULtCwwGvPu5OfIPw19PX83MFEWUfSdQ/ rEquZShmvuEYuNeJiuzWgha2LXajZ4voBWARWF0/F9nNcXd31OTqtnogaW0HKdgU dNM4OAzOi5fA/wcuqOPFQ3qd9kUQhm+ILC5CaSwF0j7S6TXEUtaLZNtZMQiGYzEF MGxrynkRz9Tfydccj79FQZNj/MLXjfSJVyu8AbHW8iWAfOMoFTlVh1PZNmCJITSp BZqm9UBvDE1cM36gqszIB9RCvd4INhBXws8PorS9NOv9C3+L6kbpIdHDlAnXOI7h eq7w== 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=fm3; t= 1649652401; x=1649738801; bh=mB+nLCZ+L9sywRzCC2aZPrLE0+qzIdPX9BH Y90NKeFs=; b=mH2xC6SDexAJ+IYea8WxPjkDleOF9cZbDGw2wAbzxf1BTZxwb2o zh2Vyh+ZplTG1e123ptFuxzUNxAPsPsSsTqZGu+pbiaezeLr2rJyb1EGsZhO/kcg 9KwaPAF8b3etiXQua3gfClCZvXXl+02P1R1dnvk5n7ALwmLTPotLw4xchaQ0fbrR oTX/Xt7ARgvbh5S5fwtu9prliXPxaMIaSz/YkEy4bDrbQXGQDGIEUlx9xPKXvD2D BWAQpL7Gw/Ao6WXjW0D/YNwLB/t45NZZbaSj5hbhyhMRRZ6NjkTcws+CdZ+Jidls WOhaqnJ//F//pytWOrmeb8Elt1Mv/oiTggA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:46:40 -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 v2 2/4] dmaengine: sun6i: Do not use virt_to_phys Date: Sun, 10 Apr 2022 23:46:30 -0500 Message-Id: <20220411044633.39014-3-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411044633.39014-1-samuel@sholland.org> References: <20220411044633.39014-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_214643_130504_0DA6242E X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reported-by: kernel test robot Reported-by: kernel test robot --- (no changes since v1) 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..a9334f969b28 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: 0x%lx\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, pchan->base - sdev->base, 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 Mon Apr 11 04:46:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808531 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF9F9C433F5 for ; Mon, 11 Apr 2022 04:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qQdlmmtxLfPyQR0izkNsgVo0+onQWYr/nwZrz6qIF1U=; b=R4EMBoppNA9wqk vLuTggxJh9VWPPMYzZsUKF9+GqbhFhckmMmSgLdJ36AWvRqjMUYrbaY2cN34ffhhXzv5hyGHrphLB NeULXbRQ02+nFwKegFiCeXs6MIrhgPuFzcjc7pzx7rF8clCLU0SCyRWgVHxE7NhA5pnHEFnn03KJH jy7nMUnx8eKrvrz23Sq6czdUh/r80aNKZ/gW49UPpB3OS6HCv+I0kRw9uiOCaQdFl7PGZe91z/gSy PtJMNWBc8EYVJpmrP5ehRhTyNhA3QCCYaddfo0ztNAe5JFAMimuvTP3rHpGIiFvo8AttBB/3xi33t yAeXzsbrb8ZQJEez8ukQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlxI-006eRg-K7; Mon, 11 Apr 2022 04:47:12 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlws-006eF0-4m for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:46:48 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C6D373200EAD; Mon, 11 Apr 2022 00:46:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 11 Apr 2022 00:46:45 -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=1649652404; x=1649738804; bh=tb GECmg7cmOgqhCSnDxa9d6F+HbU8moeuBjWkZd3Kmg=; b=iop0ys6C6nJF7C0ejv BSFwlXoOUJ9Y06N+yKU9DovoBVQnNFtaE5GU39QdrKXhdWwt0fmmC/O3DmuWhk7j Oywk+weDsSbzRkUmJ8aEuzDCzBs156hc4rly6nTyepUQkwdWTyAOgCcHWtN0TMbn wtYXEpUvW70mAPojp33isDuRsvkgzz6+3gK8Voc8RNyC3y4pP+8wAdLovWMlkfuQ RVA347KNBhJ8KjOfwJZ26gKS2qFMdDge2uyBtq1PWn76nT+KZtTMNw5eMdSCqeB8 RqsW7uGt3HQRDcFaZXb3eMS929Nz3MXbexINfh2AWMWyNhABDs4SlgFmanlzOpeo t54Q== 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=fm3; t= 1649652404; x=1649738804; bh=tbGECmg7cmOgqhCSnDxa9d6F+HbU8moeuBj WkZd3Kmg=; b=mqr8jdxhpiIuVMsx/SVjURO7cqIgxr7PQpAEpFGEr384izCzXHQ scFDng6X+YnwhXO1azYMb/zeqU7YY3rO0XSornlvHZKiwLHIu9uIO7/lHHZJfzyX RXLy+oDEex3fnCQ3B81N5ggpp8S4aY+CfJgF5xgUXeBJlqwiuS6unmSQHVPDzUps z6/9U6upCtWXTVza/fWfZOw0GR+mPclC4f2F9JUzC8W4+kuCCbd4pDCepn4kmrIU KThmqSV0aysTla82vbW3UCGTjft1NWOe4EAaN0gywc0gavx+KW7vYWvt6cZmZTbL XwnUVCy+pqGWfUSHDDPkEVF3VJZ2iZ76B4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:46:43 -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 v2 3/4] dmaengine: sun6i: Add support for 34-bit physical addresses Date: Sun, 10 Apr 2022 23:46:31 -0500 Message-Id: <20220411044633.39014-4-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411044633.39014-1-samuel@sholland.org> References: <20220411044633.39014-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_214646_276142_52117D3C X-CRM114-Status: GOOD ( 17.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Recent Allwinner SoCs support >4 GiB of DRAM, so those variants of the DMA engine support >32 bit physical addresses. This is accomplished by placing the high bits in the "para" word in the DMA descriptor. DMA descriptors themselves can be located at >32 bit addresses by putting the high bits in the LSBs of the descriptor address register, taking advantage of the required DMA descriptor alignment. However, support for this is not really necessary, so we can avoid the complication by allocating them from the DMA_32 zone. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Reported-by: kernel test robot --- Changes in v2: - Fix `checkpatch.pl --strict` style issues (missing spaces) drivers/dma/sun6i-dma.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index a9334f969b28..bd5958185ed1 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -90,6 +90,14 @@ #define DMA_CHAN_CUR_PARA 0x1c +/* + * LLI address mangling + * + * The LLI link physical address is also mangled, but we avoid dealing + * with that by allocating LLIs from the DMA32 zone. + */ +#define SET_SRC_HIGH_ADDR(x) ((((x) >> 32) & 0x3U) << 16) +#define SET_DST_HIGH_ADDR(x) ((((x) >> 32) & 0x3U) << 18) /* * Various hardware related defines @@ -132,6 +140,7 @@ struct sun6i_dma_config { u32 dst_burst_lengths; u32 src_addr_widths; u32 dst_addr_widths; + bool has_high_addr; bool has_mbus_clk; }; @@ -223,6 +232,12 @@ to_sun6i_desc(struct dma_async_tx_descriptor *tx) return container_of(tx, struct sun6i_desc, vd.tx); } +static inline bool sun6i_dma_has_high_addr(struct sun6i_dma_dev *sdev) +{ + return IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) && + sdev->cfg->has_high_addr; +} + static inline void sun6i_dma_dump_com_regs(struct sun6i_dma_dev *sdev) { dev_dbg(sdev->slave.dev, "Common register:\n" @@ -645,7 +660,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_memcpy( if (!txd) return NULL; - v_lli = dma_pool_alloc(sdev->pool, GFP_NOWAIT, &p_lli); + v_lli = dma_pool_alloc(sdev->pool, GFP_DMA32 | GFP_NOWAIT, &p_lli); if (!v_lli) { dev_err(sdev->slave.dev, "Failed to alloc lli memory\n"); goto err_txd_free; @@ -655,6 +670,9 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_memcpy( v_lli->dst = dest; v_lli->len = len; v_lli->para = NORMAL_WAIT; + if (sun6i_dma_has_high_addr(sdev)) + v_lli->para |= SET_SRC_HIGH_ADDR(src) | + SET_DST_HIGH_ADDR(dest); burst = convert_burst(8); width = convert_buswidth(DMA_SLAVE_BUSWIDTH_4_BYTES); @@ -705,7 +723,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( return NULL; for_each_sg(sgl, sg, sg_len, i) { - v_lli = dma_pool_alloc(sdev->pool, GFP_NOWAIT, &p_lli); + v_lli = dma_pool_alloc(sdev->pool, GFP_DMA32 | GFP_NOWAIT, &p_lli); if (!v_lli) goto err_lli_free; @@ -715,6 +733,9 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( if (dir == DMA_MEM_TO_DEV) { v_lli->src = sg_dma_address(sg); v_lli->dst = sconfig->dst_addr; + if (sun6i_dma_has_high_addr(sdev)) + v_lli->para |= SET_SRC_HIGH_ADDR(sg_dma_address(sg)) | + SET_DST_HIGH_ADDR(sconfig->dst_addr); v_lli->cfg = lli_cfg; sdev->cfg->set_drq(&v_lli->cfg, DRQ_SDRAM, vchan->port); sdev->cfg->set_mode(&v_lli->cfg, LINEAR_MODE, IO_MODE); @@ -728,6 +749,9 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg( } else { v_lli->src = sconfig->src_addr; v_lli->dst = sg_dma_address(sg); + if (sun6i_dma_has_high_addr(sdev)) + v_lli->para |= SET_SRC_HIGH_ADDR(sconfig->src_addr) | + SET_DST_HIGH_ADDR(sg_dma_address(sg)); v_lli->cfg = lli_cfg; sdev->cfg->set_drq(&v_lli->cfg, vchan->port, DRQ_SDRAM); sdev->cfg->set_mode(&v_lli->cfg, IO_MODE, LINEAR_MODE); @@ -786,7 +810,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic( return NULL; for (i = 0; i < periods; i++) { - v_lli = dma_pool_alloc(sdev->pool, GFP_NOWAIT, &p_lli); + v_lli = dma_pool_alloc(sdev->pool, GFP_DMA32 | GFP_NOWAIT, &p_lli); if (!v_lli) { dev_err(sdev->slave.dev, "Failed to alloc lli memory\n"); goto err_lli_free; @@ -798,12 +822,18 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic( if (dir == DMA_MEM_TO_DEV) { v_lli->src = buf_addr + period_len * i; v_lli->dst = sconfig->dst_addr; + if (sun6i_dma_has_high_addr(sdev)) + v_lli->para |= SET_SRC_HIGH_ADDR(buf_addr + period_len * i) | + SET_DST_HIGH_ADDR(sconfig->dst_addr); v_lli->cfg = lli_cfg; sdev->cfg->set_drq(&v_lli->cfg, DRQ_SDRAM, vchan->port); sdev->cfg->set_mode(&v_lli->cfg, LINEAR_MODE, IO_MODE); } else { v_lli->src = sconfig->src_addr; v_lli->dst = buf_addr + period_len * i; + if (sun6i_dma_has_high_addr(sdev)) + v_lli->para |= SET_SRC_HIGH_ADDR(sconfig->src_addr) | + SET_DST_HIGH_ADDR(buf_addr + period_len * i); v_lli->cfg = lli_cfg; sdev->cfg->set_drq(&v_lli->cfg, vchan->port, DRQ_SDRAM); sdev->cfg->set_mode(&v_lli->cfg, IO_MODE, LINEAR_MODE); @@ -1174,8 +1204,6 @@ static struct sun6i_dma_config sun50i_a64_dma_cfg = { }; /* - * TODO: Add support for more than 4g physical addressing. - * * The A100 binding uses the number of dma channels from the * device tree node. */ @@ -1194,6 +1222,7 @@ static struct sun6i_dma_config sun50i_a100_dma_cfg = { BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | BIT(DMA_SLAVE_BUSWIDTH_8_BYTES), + .has_high_addr = true, .has_mbus_clk = true, }; From patchwork Mon Apr 11 04:46:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12808532 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1355C433EF for ; Mon, 11 Apr 2022 04:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DvFriqZ7yeAZH2Ehz8asMOWYc3jjIycU0FV9P6GxpIs=; b=i2+N1z0C0je0MM 0xbD4nbY7fNrdiSgml7jrb/BE/3xTTiQyXCGPEYBgTlA6AANypqaBQ0zOqadbgETknNAriAvCmHmt ccZVbBoZHI3DDLoOgHZwH3dT41NWaS2vpBJwS8HyhwKJofwjAaEoftr2bWIeg4vkypuh1VqptvLcl H/uu+EZePEiUx6GjZU1cLm/gGnI3SRC3VIByeDFAPg3NSuxV2f6IUaTf2y+XobB3dXw4a0/gL58sr veeKig8W5gC/II0qyPVRGSzorwGPOAM0d87UtFg595dKS1Sgi1DmFXi2hbFb3Ag3KQbRrX0PiETJz GTQeGtzKwJgif9QiqB5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlxX-006eYE-CJ; Mon, 11 Apr 2022 04:47:28 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndlwv-006eGT-5E for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 04:46:51 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D65D93200EE0; Mon, 11 Apr 2022 00:46:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 11 Apr 2022 00:46:48 -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=1649652407; x=1649738807; bh=ZP 5rt6ptJXp+J3FSVn6SSTBlioBq49HeROquJ1oQ8ZE=; b=VVLaE0wwY3jVr6pHAn 86xiTa+pLBsFpdprReDzrD0528rKtGwt40LTZyCo8+oQM12q2GMS/J4IrpiQZD3P qBaZnTC2eAzYewxlTMlQvEo+6lletQ/ZWymFrUi3gSf7UIA3AMDbO44MyfxMt2Kv D5c7etiujMEd5APGnpah+EcKp8y/vnN13JGKpoNJuniXmdA7oc+kvCXX/Hgol4RX kFD8AmXg5s9q262Cs3IafHInidFSlAfDNSUIRJpmYR2q4krxjyQmXEXrBUhjmhVX hDJeJhMZHBCpL1P80/m/myVVYlP5OCnGHHoqenaLeDboCswEmr2yNflkjEDfRK+b sdKw== 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=fm3; t= 1649652407; x=1649738807; bh=ZP5rt6ptJXp+J3FSVn6SSTBlioBq49HeROq uJ1oQ8ZE=; b=BkJyetYmAuD9u99LUzTowTwkBc6ZfabIBBcFxMDlGWfljctFEWR i/bbIH+RCXJTscvjvdyLfRwBB6wHlV7SNNzaDZdzL/bUnnd0LQGHPa9TwOqQtXww t/Z/jIG/Ja4/kUzxISGhUIb/HvpKWtiSG6KP3bRIPJ0D8kp38KwhzvnOU8sr6G/J n2CvUHQfz0u+7Z+thT2rbjrqDwti/wen4EcJ5O37IiJD8DPnx2RmPDVDvP9W6ab9 qocNRt18CoLI1AzwN8GHFx6ShQHbm9nSrenrl4nz0RCWU+wrYXbiCnPIAkVp5Q0B 1FZAHb0LpymIGjvXVIIG3SJ79rl0jdCLQgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekhedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 00:46:46 -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 v2 4/4] dmaengine: sun6i: Add support for the D1 variant Date: Sun, 10 Apr 2022 23:46:32 -0500 Message-Id: <20220411044633.39014-5-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411044633.39014-1-samuel@sholland.org> References: <20220411044633.39014-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_214649_282544_FD3F2B89 X-CRM114-Status: GOOD ( 14.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 bd5958185ed1..1b95e93c14ee 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1277,6 +1277,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 },