From patchwork Tue Oct 18 18:12:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siarhei Volkau X-Patchwork-Id: 4285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2096910wrs; Tue, 18 Oct 2022 11:17:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+8N5qv+xJ+Kyyho7TUmBhClBR+oTeC9ZvsEUfnj5yMnYmLXK8TKGcyiZnc+9XfOIHZkCL X-Received: by 2002:a05:6a00:1828:b0:563:24ea:5728 with SMTP id y40-20020a056a00182800b0056324ea5728mr4326868pfa.3.1666117049623; Tue, 18 Oct 2022 11:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666117049; cv=none; d=google.com; s=arc-20160816; b=Hg0Del/Gcz7smPYIXn9CjWoGVTxptpEFL8X/mJzSAJph3TzB4glFkqKx/1NLGnqjO+ Wn0Knpq+T3i9vKpurPNgekOxkEzrhIglV+hJ8tRkBDksIYT3DxmbLPQw8hK1NpDQLb/0 l8EFCYYUasMal9QicAaYXQjPWoWWdCUJVq00dL7IW0WxELBp/JGM3fViy/wzPF8R2w4K BPv0mYr8YRwcMu/HlVGsDtOzbm2BK9swejKDLELgVrdM/wlj2XezcJD9XxnPSDyU4bHd ju0IJWDuq1Lg51BXIowBDEAcR4UL1VFcYjUtsyfzi2ja6iF+eKynRdv/+bvUYPyDixYk ha8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=O9BWsdOmt2DdZ9rM9JV+zrPCJi6ZcySjb5J/mdJmGW4=; b=mv4L42smhPORu7l5QZUK4u3Wp35Y/ki2Y5fOrkKAsxlPTAivfVh3ftV7DL+zw2MShO m1SxPNPrfgDgdMJa55nkb8d9NCDdcs/k3EURKg/UuLZpaeRPw7AvrC3xPhhwrLLaPTgj gKPqgACMK44YAFmkmudi4oYZ+QgXcMNTRfACyyT+dmUsHgrWnPMVlppTWqr5O3LT1a1P dvOT+bBNx88Nww+uvvL71FeCv+yVZwBymWBxczsKp31Wpgz2GSoRGqanpipXZD7Q20Cc otjPiN5G0PZE2JeaPht5Il7W0L0F1/D4uQL+Vp/3HKZu2ajlozRpciRqSM/Xc6QCsjOf ynDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=apFEQeVU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a625503000000b00542c772d478si15199227pfb.247.2022.10.18.11.17.16; Tue, 18 Oct 2022 11:17:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=apFEQeVU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbiJRSMu (ORCPT + 99 others); Tue, 18 Oct 2022 14:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbiJRSMp (ORCPT ); Tue, 18 Oct 2022 14:12:45 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45D1B74365; Tue, 18 Oct 2022 11:12:44 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id k2so34325403ejr.2; Tue, 18 Oct 2022 11:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O9BWsdOmt2DdZ9rM9JV+zrPCJi6ZcySjb5J/mdJmGW4=; b=apFEQeVUoC9kYaMCL1ZrShTVl2Gbz8Nn7EAwFWSkjNo2A1a4YetvqT6i8zUUqI5IIT xrARLa2v1tCo02v0oXYnrSoPMR+Fn6mTme6LzAwbFUNSuzNrUy2FiPC4pA20QQbJOJTy PZGJQTa6xdg4EWYlGPQOiK+hOZMP4l6pOrQvKgL0vaEktZA/qvvQepSnJT+S7HI0jH4r XlZpbKEimyAoahZsewt5h3/pweuL/Rh0eVd3XTVqRVIhkYJpC/vs6LVB7Q1shy/HJnJd jN7WySWufLuZi9ciS2BkvKOH8OyxxQYxF0L8X8tHmdskoM0UjGaxEVL4OXM5b48RjQ2B fBPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O9BWsdOmt2DdZ9rM9JV+zrPCJi6ZcySjb5J/mdJmGW4=; b=pz/Si6goxQAt/2EFchCx5fXbuQLd4x+86Dyih+4wEijwEGgF/9uROjPeMT7ql9+3yi SIaYZBKZ0jFuVcIlyGhudTN1qnKXVqImH9N7aPjGpTb3zCvDCYQKA0T6XTgNxZVaU6SV d7rrMNDf1f8T4JVZRqXx3UaeD4LXVX2ugWQLEnBvx8IrQr7L/tNziym3ivA2s7dtsX9u V1LhaHzTxn4cNsG6IioYcAjlLpbN3Uktvgyw1e/azd0OWsoDNCGNziwwx9Ih1zkbjkXs Y3f5HEvpc2ixIjcDd9gXsrcF/EmLZ1itaTsRzXFGlm2EcEep6tfxx7mDEUpeyCp/3LKB 6aiA== X-Gm-Message-State: ACrzQf0ajtoKESJRZxfjq3IXXGfGvwF2//hmFtiJZUzXk6WxJLUJSpmc hiduqjNb54Ogdy8aZW2IuAk= X-Received: by 2002:a17:907:1b1e:b0:783:8e33:2d1c with SMTP id mp30-20020a1709071b1e00b007838e332d1cmr3506475ejc.304.1666116762780; Tue, 18 Oct 2022 11:12:42 -0700 (PDT) Received: from hp-power-15.localdomain (mm-39-1-212-37.vitebsk.dynamic.pppoe.byfly.by. [37.212.1.39]) by smtp.gmail.com with ESMTPSA id u22-20020a056402111600b00458dc7e8ecasm9253043edv.72.2022.10.18.11.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 11:12:42 -0700 (PDT) From: Siarhei Volkau Cc: Siarhei Volkau , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Paul Cercueil , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755. Date: Tue, 18 Oct 2022 21:12:19 +0300 Message-Id: <20221018181219.3251309-3-lis8215@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221018181219.3251309-1-lis8215@gmail.com> References: <20221018181219.3251309-1-lis8215@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747050351489108201?= X-GMAIL-MSGID: =?utf-8?q?1747050351489108201?= The JZ4755 has 4 DMA channels per DMA unit, two idential DMA units. The JZ4755 has the similar DMA engine to JZ4725b and it has the same bug as JZ4725b, see commit a40c94be2336. At least the JZ_SOC_DATA_BREAK_LINKS flag make it work much better, although not ideal. Tested-by: Siarhei Volkau Signed-off-by: Siarhei Volkau Reviewed-by: Paul Cercueil --- drivers/dma/dma-jz4780.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 2a483802d..9c1a6e9a9 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -1038,6 +1038,13 @@ static const struct jz4780_dma_soc_data jz4725b_dma_soc_data = { JZ_SOC_DATA_BREAK_LINKS, }; +static const struct jz4780_dma_soc_data jz4755_dma_soc_data = { + .nb_channels = 4, + .transfer_ord_max = 5, + .flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC | + JZ_SOC_DATA_BREAK_LINKS, +}; + static const struct jz4780_dma_soc_data jz4760_dma_soc_data = { .nb_channels = 5, .transfer_ord_max = 6, @@ -1101,6 +1108,7 @@ static const struct jz4780_dma_soc_data x1830_dma_soc_data = { static const struct of_device_id jz4780_dma_dt_match[] = { { .compatible = "ingenic,jz4740-dma", .data = &jz4740_dma_soc_data }, { .compatible = "ingenic,jz4725b-dma", .data = &jz4725b_dma_soc_data }, + { .compatible = "ingenic,jz4755-dma", .data = &jz4755_dma_soc_data }, { .compatible = "ingenic,jz4760-dma", .data = &jz4760_dma_soc_data }, { .compatible = "ingenic,jz4760-mdma", .data = &jz4760_mdma_soc_data }, { .compatible = "ingenic,jz4760-bdma", .data = &jz4760_bdma_soc_data },