From patchwork Tue May 3 06:51:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12835075 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 26DF7C433EF for ; Tue, 3 May 2022 06:52:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbiECGzr (ORCPT ); Tue, 3 May 2022 02:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbiECGz2 (ORCPT ); Tue, 3 May 2022 02:55:28 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF9F1834F for ; Mon, 2 May 2022 23:51:57 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id z99so18822625ede.5 for ; Mon, 02 May 2022 23:51:57 -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 :mime-version:content-transfer-encoding; bh=uXFFTUALU/8aWUEnUkYb7ujeKf4ayBbE0A4maETvon8=; b=ghcGEGkDJgXdnqqaDjnZs2KLn8eN/PpXDDg2h4Af92aTMcGe5OVx2KJjdExvljv6WB X8rrZSIAHcqHCbhvVKiawXr2l0nexzZg4nGiQM1vrCfhBg6MN+b/SE4wqh3SOofXPWWi 5JwFXiAFQ1J7i+wqHcpsUu4f61XBto2jAP/RNDyY7t6N9jw3AemR+pN5e6jwa02214bm Ug9cpn8B1jH+TK1UjDDzLPPe73yCvu2cz1MPYneBjzB3oPvxvCt4NdG40Lt8mtGD0sKs S+3GQZOKo3I2noLaYetrnhO9tS/ggECFHXW52xvSYEUDsPJdQaQ7S0nPSmtjSU5lqBfq X76Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uXFFTUALU/8aWUEnUkYb7ujeKf4ayBbE0A4maETvon8=; b=pKBR9WUjQdOgBJXF5trbLogcu3zrpmoJ3XKe1S50c7a4bSQZRTp7bYAYEW9yQxiaAE 1JmP8DdPH6YdgkFPHVu4Gd+YZ1GzerM8Nh/YU1s6+FVQjz01tzCtLz4tkP9UGMDG+pkF F0hxjhsI5eNUeT+5v2MAVbA75KqD5HWP7qiN+ZonXdbs0SmdHZ+79JVx45tu5BbGR9Qr bMGeR/8atsl0xohcq3qpWzIX5DfXtUje8+eXKnRszhHlhy8laKNmZeDpbm/4w0aAbviL qA3NoVZoIUuiJPfkAVSaFzNGK//eg/dSWNmRChJxCaCI+Hh9SRG0SYaR/czSL70Y59ws LIhw== X-Gm-Message-State: AOAM533gieAL8CPOzFotASGHAYTrSmUWJde0lVpiaLgh9NiGqYC8pqnO QscpqMV/RiJULla74ukJO76XVLkEK3iL4w== X-Google-Smtp-Source: ABdhPJxTROx9nsAyFQ7ae8gf/7Cu+f3ib2hRsIHe7UuO8q8pr9uyJpczkViMPleFFqI8dD/6SsIxvA== X-Received: by 2002:a05:6402:354a:b0:427:d0e1:8ef3 with SMTP id f10-20020a056402354a00b00427d0e18ef3mr6076134edd.66.1651560715209; Mon, 02 May 2022 23:51:55 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id h20-20020a1709070b1400b006f3ef214db8sm4246237ejl.30.2022.05.02.23.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 23:51:54 -0700 (PDT) From: Krzysztof Kozlowski To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Orson Zhai , Baolin Wang , Chunyan Zhang , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 1/3] dt-bindings: dmaengine: sprd: deprecate '#dma-channels' Date: Tue, 3 May 2022 08:51:45 +0200 Message-Id: <20220503065147.51728-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> References: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org The generic property, used in most of the drivers and defined in generic dma-common DT bindings, is 'dma-channels'. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/sprd-dma.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/sprd-dma.txt b/Documentation/devicetree/bindings/dma/sprd-dma.txt index adccea9941f1..c7e9b5fd50e7 100644 --- a/Documentation/devicetree/bindings/dma/sprd-dma.txt +++ b/Documentation/devicetree/bindings/dma/sprd-dma.txt @@ -8,10 +8,13 @@ Required properties: - interrupts: Should contain one interrupt shared by all channel. - #dma-cells: must be <1>. Used to represent the number of integer cells in the dmas property of client device. -- #dma-channels : Number of DMA channels supported. Should be 32. +- dma-channels : Number of DMA channels supported. Should be 32. - clock-names: Should contain the clock of the DMA controller. - clocks: Should contain a clock specifier for each entry in clock-names. +Deprecated properties: +- #dma-channels : Number of DMA channels supported. Should be 32. + Example: Controller: @@ -20,7 +23,7 @@ apdma: dma-controller@20100000 { reg = <0x20100000 0x4000>; interrupts = ; #dma-cells = <1>; - #dma-channels = <32>; + dma-channels = <32>; clock-names = "enable"; clocks = <&clk_ap_ahb_gates 5>; }; From patchwork Tue May 3 06:51:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12835076 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 2DD59C433FE for ; Tue, 3 May 2022 06:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbiECGzv (ORCPT ); Tue, 3 May 2022 02:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbiECGz3 (ORCPT ); Tue, 3 May 2022 02:55:29 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2420218E3A for ; Mon, 2 May 2022 23:51:58 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id g20so18811657edw.6 for ; Mon, 02 May 2022 23:51:58 -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 :mime-version:content-transfer-encoding; bh=iFtQQxlzreRUl8NYVzyEv+oobXt03dUXlkwOfmHujiQ=; b=ObzIYFhn3qY2WDZ/YfTsBwx9WvtaoZp4zwpnGQxHGIY/Qw4+ccfc/mgZguycN9RgNq c4K+5wBQ2UdNMA4U9iOnSGlCLwSLyh6q0SPuBQXnJEHjsTkbCRYr+igUJvoXJEOLhQG1 aZmx9Zs/+ZNpN/E6o5FnNQ8Ts/PZpiC/Y0UMkx9Nf2r9Sk1a0UUnOwl1fFlakuAW3jds Uxy9L0+s/aic9NA7lZer1R+B0c69fUOIBByIEUikxSiGEwvCdyStZHTADck76WH+IfAi jUdi++P7KeXxRhVISnU2RX2JM3P2p6rcHsrTL/+DabDuEZSBEg9i57hTB9mqUtCrnNmj PGlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iFtQQxlzreRUl8NYVzyEv+oobXt03dUXlkwOfmHujiQ=; b=00DRgIhu9TMoZuhnefNrQsZymTQcMrcjMSa2KBBRqpo7oIrES9UFvd4eVDBi68mS6Y eDbIi1TojvR3i7XB8xUoUjhTSWwcY6NTCEAl3J63C4x/Ubiw394LKXOucCxHDeO1XFZD SW0ScPllS/oLiS/BEAHFgZFC1ga3xeCD51vms7ZPJUzMkl/N4v4CVxWMuwAo5Pr7OYx+ J3xMWnfg/8W7ieBeQnFHXQo3kywMEQXBP4FEvCuIeeelKiJzKREoKjf3D99dCPIm7M8C cehLIBhweqzdQQCV8E9dXPb8hOQbFrCxOZQeVGQ/TLFfKtDQWoq4jRjIQr33yzxhsXOI gKqA== X-Gm-Message-State: AOAM533nP/gn9gF3CzU1vRnBXDjtO9yCOhMoV2xp5/it34eALCnfCPWv 9cZZ6lN6VS3Ka7sqgFNJ7ViuL5rsDZ+iQg== X-Google-Smtp-Source: ABdhPJzJYn4i3EuPd/sFsg7zyP4pTIxT42kD7CyLvGoXyodayp7ZJcBmbNizeofPWzwWRbjEPDQyCA== X-Received: by 2002:a50:cd08:0:b0:426:1d9b:4b13 with SMTP id z8-20020a50cd08000000b004261d9b4b13mr16505740edi.360.1651560716588; Mon, 02 May 2022 23:51:56 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id h20-20020a1709070b1400b006f3ef214db8sm4246237ejl.30.2022.05.02.23.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 23:51:56 -0700 (PDT) From: Krzysztof Kozlowski To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Orson Zhai , Baolin Wang , Chunyan Zhang , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 2/3] dmaengine: sprd: deprecate '#dma-channels' Date: Tue, 3 May 2022 08:51:46 +0200 Message-Id: <20220503065147.51728-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> References: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org The generic property, used in most of the drivers and defined in generic dma-common DT bindings, is 'dma-channels'. Switch to new property while keeping backward compatibility. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Baolin Wang --- drivers/dma/sprd-dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 7f158ef5672d..2138b80435ab 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -1117,7 +1117,11 @@ static int sprd_dma_probe(struct platform_device *pdev) u32 chn_count; int ret, i; - ret = device_property_read_u32(&pdev->dev, "#dma-channels", &chn_count); + /* Parse new and deprecated dma-channels properties */ + ret = device_property_read_u32(&pdev->dev, "dma-channels", &chn_count); + if (ret) + ret = device_property_read_u32(&pdev->dev, "#dma-channels", + &chn_count); if (ret) { dev_err(&pdev->dev, "get dma channels count failed\n"); return ret; From patchwork Tue May 3 06:51:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12835077 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 B54C0C4332F for ; Tue, 3 May 2022 06:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230375AbiECG4P (ORCPT ); Tue, 3 May 2022 02:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbiECGzp (ORCPT ); Tue, 3 May 2022 02:55:45 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69C8919021 for ; Mon, 2 May 2022 23:51:59 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id i19so31587831eja.11 for ; Mon, 02 May 2022 23:51:59 -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 :mime-version:content-transfer-encoding; bh=vWso6SETa3zmnQdk3zavu/Qn/dZv2mGNi7dOArTUaJU=; b=w3sCbaVhdxKfSGWyhX040512wTc69vx2SUBodkB0g2Tdbg0kRkxlZ6AWWb/9BruAhv V2Qx7wQg2daDTYJiZhgtCdUQlgUu2YwGHybtQr03nAZKxawAJjgl0mO8sUcBkBnJDy/L PFNJrEde2YyZrkDYKDCoPqL/mYeNSrz6ywbQxepw4yFPAkkZFMklxcOKP4Id5ThCQpXt Wrsn79iQxXbMs16ic6AaUDN6Vb0+MzQoL5lz+BGEmLHwOHE79P6vq+DQpOPDYnQWH/Ut uucQJdSGjvInbTaiaX1fiedUMqnhnNc2aj6lRRJw/m1DlhCwnkenjQQDmSbowNJ5M6+q +KlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vWso6SETa3zmnQdk3zavu/Qn/dZv2mGNi7dOArTUaJU=; b=RLq3Ot5TP+mxYUd5r4+kdf1VtucIdNNGIzFAvLDFb2uyJ5opclvtf/Betpv8Rdqmow VNuXjpMxODUvKzC2ohduIVbaILRDzFk+XfYeB2d/tti/kfUAqna2J2iQzwaWAw/1GK/L nNOblLda0C+DFtGEak1auOBWStWo+w+nQyZOhOS66ArL/9+4Ntom89G6L0PFukmS52JN vZ03LBZTXJr5kIZxiDa9utZQ3F2323He/k0iSCOapq9p/Vw9EeMY4TK8RzUktDWIrTLR EUfnHlyYErZvyyhZTSPzYTt8CwF180BSNH9Id4nhr5tKg96mKsE+Mcx4C6A/XpvbdSZO wuxQ== X-Gm-Message-State: AOAM531ZktaLjaLJqWC6H1kgypfCv2yoffSA4oEADCjsxnBB1O1SZIb+ nYtIZsbXQ6b0fXIEX9LJHHM7tQ== X-Google-Smtp-Source: ABdhPJwz38M4xbaO2wUwwhfgjWjZcDTE1d5C1v2hzgq3bOMG27kZiRkxckaXy2K4QNxkqurHswPA0g== X-Received: by 2002:a17:906:cb09:b0:6f3:87ca:1351 with SMTP id lk9-20020a170906cb0900b006f387ca1351mr14242199ejb.674.1651560717964; Mon, 02 May 2022 23:51:57 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id h20-20020a1709070b1400b006f3ef214db8sm4246237ejl.30.2022.05.02.23.51.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 23:51:57 -0700 (PDT) From: Krzysztof Kozlowski To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Orson Zhai , Baolin Wang , Chunyan Zhang , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 3/3] arm64: dts: sprd: use new 'dma-channels' property Date: Tue, 3 May 2022 08:51:47 +0200 Message-Id: <20220503065147.51728-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> References: <20220503065147.51728-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org The '#dma-channels' property was deprecated in favor of one defined by generic dma-common DT bindings. Add new property while keeping old one for backwards compatibility. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Baolin Wang --- arch/arm64/boot/dts/sprd/whale2.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch/arm64/boot/dts/sprd/whale2.dtsi index 79b9591c37aa..89d91abbd5d1 100644 --- a/arch/arm64/boot/dts/sprd/whale2.dtsi +++ b/arch/arm64/boot/dts/sprd/whale2.dtsi @@ -126,7 +126,9 @@ ap_dma: dma-controller@20100000 { reg = <0 0x20100000 0 0x4000>; interrupts = ; #dma-cells = <1>; + /* For backwards compatibility: */ #dma-channels = <32>; + dma-channels = <32>; clock-names = "enable"; clocks = <&apahb_gate CLK_DMA_EB>; }; @@ -272,7 +274,9 @@ agcp_dma: dma-controller@41580000 { compatible = "sprd,sc9860-dma"; reg = <0 0x41580000 0 0x4000>; #dma-cells = <1>; + /* For backwards compatibility: */ #dma-channels = <32>; + dma-channels = <32>; clock-names = "enable", "ashb_eb"; clocks = <&agcp_gate CLK_AGCP_DMAAP_EB>, <&agcp_gate CLK_AGCP_AP_ASHB_EB>;