From patchwork Wed Apr 27 16:14:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12829129 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 CC2F4C433F5 for ; Wed, 27 Apr 2022 16:17:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242773AbiD0QUd (ORCPT ); Wed, 27 Apr 2022 12:20:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242333AbiD0QS3 (ORCPT ); Wed, 27 Apr 2022 12:18:29 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E982F72E31 for ; Wed, 27 Apr 2022 09:14:33 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id g23so2501743edy.13 for ; Wed, 27 Apr 2022 09:14:33 -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=Yyayk/RjcawLgWYAzZuuqM4z9iA3IiQWnxVg7aM9FBk=; b=SRAiD4Nl08BRnA5G7RHqOxRjhHE/2t4zEOLeZktktZ/L1aAhuB+FqOSwEtEXaLZzT2 R4SRGxY45dUykug8xT/MJ8HDy3ZXw2+hsJqDVORv4ydnMPjuLhM2xek4KsA2Ezee0PEz X3d7W5t7hqIX3FvHDqGXTFnQFekw6notlytPaegaJDBkeIZ4rfHCRdHJNrADTbBfp5TM zv4PGhXunU15sJ6qyGaHuE39TxxIsI7o4ssuwuGWpgXkYd9+zwhTPgZ/G5HEVLzi1WIx 67wOO1MD9X6/6dHae6w/5csQ/1l9ol+KwqpAQvptBEZoNCeWwYjKDUHDeBu2zav02WaK B0yw== 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=Yyayk/RjcawLgWYAzZuuqM4z9iA3IiQWnxVg7aM9FBk=; b=EpQjQ+yMoDUh7niTt39NgOlkXi9H/LuKcCRUsnu33gkExX8ESv//8l1oDYkXFmR59K smMlCtLusfqarls+QCX2DZ3IRQqIc4PnR60OwD3va4RXSe3hDoa6YNIkRJNQws4fwfVZ rkg9GxRRlp7U12Do0K/Kgn9hwp+2dy9d+Qo7hXi6dP9gqwyai/1FZZ4u6XoCqLAj528t SJHGjsAU4ks41YPebkwbLkP93p40RK51bLCXuEo2H4zw/cpB+IxdC1ED6i9DgdliGsuA xGEVd/XWOulgkhX9EydUHUH5YPUIoCpJ35txn4t1bfQIBS8Awg06ywYM5f40bnH7pViw JkQA== X-Gm-Message-State: AOAM530a6ffMq0M6EepjOWD1h81trtilYGFuVkygdcWxoMU5NEVX8pLY 3BaW32uSo5hqst22h/JIBI56Vg== X-Google-Smtp-Source: ABdhPJxmugYp9cqdpnSVekLRx91zWH/+Y9y80LLPwQttFOJ5mLF//PfXkRkvHEvMD4NYa46z7MO2Gg== X-Received: by 2002:aa7:cd0a:0:b0:425:bc13:4ccb with SMTP id b10-20020aa7cd0a000000b00425bc134ccbmr29595892edw.229.1651076068228; Wed, 27 Apr 2022 09:14:28 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id b17-20020aa7dc11000000b00412ae7fda95sm8583383edu.44.2022.04.27.09.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 09:14:27 -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 1/3] dt-bindings: dmaengine: sprd: deprecate '#dma-channels' Date: Wed, 27 Apr 2022 18:14:21 +0200 Message-Id: <20220427161423.647534-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427161423.647534-1-krzysztof.kozlowski@linaro.org> References: <20220427161423.647534-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 Wed Apr 27 16:14:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12829124 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 55168C433F5 for ; Wed, 27 Apr 2022 16:17:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242256AbiD0QUW (ORCPT ); Wed, 27 Apr 2022 12:20:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242909AbiD0QS6 (ORCPT ); Wed, 27 Apr 2022 12:18:58 -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 D3316C42FE for ; Wed, 27 Apr 2022 09:14:37 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id p4so2573397edx.0 for ; Wed, 27 Apr 2022 09:14:37 -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=zFx6dgEJwUJ09auBqAc9Lu1g3Aeq6JvXDOqtYxmZsE6v3AYgQR2nNJNDpG5pRMMWo/ nKI8pRznYLgHoirfU0wE8mMRr21vyjMaixW8O6sJO9kH9H35F2WS0TQFeduP1MZaGwRf hOBGngSyvJCyOGs7h8wDHIpgyadTqEN66dqCnhuGGs2w0aeAlqMcJxGz3QNg2a+Lw3Fh fYAzSVzQH3ueo7HGm5qtczjqcexzT2Ua7pvdCYu45CFGUhHQLsh08WL64sYJpWW+EJpt Xv0Kp5a15P0VFs9LsE+kQfR3eedCfYQYvZs4ieiiw2FNeIy7m0QCetIGWuQDkNLpEttr /zMg== 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=YOXFo2LDQhmn5Wpaa6/AzI7Y522qysP96cvxU0Wq3wbt8+mpLakIh8XhKeQlsHDlL0 wrLqM5ZrXsrbP6v6fpD9tFQ1GrAYdP1QFcUhv5/6NOOwsueXOIULMau+SE5nKx/oWbRC ouu71Ni8qzIhDQ3n92VifeiD+mCRH2sdjqR/nOAmBzOeSbxyOlfbvwg91wKvCurLQRzg 61E+hz3YBEsXOM3Rc1ecgT7KdbLLPDvY6grDTP1/euEEYbRpNVxRh4IuFLwuri5H3Rh2 FTm5oWahohIfJetNnEVs/RKVG9x+OT//K3I85R4CUiIPvNfH8bhYlbnUKz5okW3ZJbfO R9hQ== X-Gm-Message-State: AOAM530h3tUpIaebnDcAfYQEY6n41tyVXb1IydoNsu3xiWqZm4ndVS3k RCBBUBQo4W9q7CVDRXYn+j0iiQ== X-Google-Smtp-Source: ABdhPJxFd9VEGHMo4tPif+bW/nQIupvHnKCCUsLpD5OoAgT4+qXxFMlzJxh9DvTdhH2ifhDxn3Q1Ww== X-Received: by 2002:a05:6402:2214:b0:425:d6ed:de5d with SMTP id cq20-20020a056402221400b00425d6edde5dmr22029579edb.383.1651076069273; Wed, 27 Apr 2022 09:14:29 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id b17-20020aa7dc11000000b00412ae7fda95sm8583383edu.44.2022.04.27.09.14.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 09:14:28 -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 2/3] dmaengine: sprd: deprecate '#dma-channels' Date: Wed, 27 Apr 2022 18:14:22 +0200 Message-Id: <20220427161423.647534-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427161423.647534-1-krzysztof.kozlowski@linaro.org> References: <20220427161423.647534-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 --- 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 Wed Apr 27 16:14:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12829126 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 42FDAC433EF for ; Wed, 27 Apr 2022 16:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242642AbiD0QU2 (ORCPT ); Wed, 27 Apr 2022 12:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242501AbiD0QSr (ORCPT ); Wed, 27 Apr 2022 12:18:47 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A960D83B03 for ; Wed, 27 Apr 2022 09:14:39 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id k27so2528710edk.4 for ; Wed, 27 Apr 2022 09:14:39 -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=8alvGyBBDkI+jnFt5S8vbtqPulfD6lL++1vfGqh/pyA=; b=SIDxM8u7nMxxqj5wsbYizeXXTLXYGtlGEjLw60UnJal85YRIm1PE8fq5Q1knv0G6qs SrpXniDJb13xtNYcGUPaKI9VJ74Wy5r8G/pDTSOFcIn1bwLwoEbNBOPAZdZsbqHNgF4M KgLxWj+n8YD/9yowwKM/gG86oyZJY8f+CIwhA4HnmM5ioUX1JOUBnq7fuF+NeHHFAI9W ll14I3oAfA9dECJ80yh8YgkSrMKzxarCR532JluTUDD0HNTkblVoSq3qwMzYinrqd3TJ ej6xJ9wBAJ8oXB/otALdykILgxfdE8rM6cO9pcrny4QDv8yRwvq7go0ydvyML04+CfRs F4uQ== 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=8alvGyBBDkI+jnFt5S8vbtqPulfD6lL++1vfGqh/pyA=; b=HbdZO6qVRMuzFe5435RnSPyl/htsw8QqelF906mP9t3psiTgkmbTuDMefsiuGqf+lQ EYDJs49t7Y7nZsHM9vzYwgbnhlL9SLKfUKNe2fyU7DM98WLzA3yFWKT7fVaMHnb1FNOs FOG/Mir1r+Ag5DIF0PqrNTLnpSz5x8xB77vEe+LLTvMLpcGFW06s5aVb3RT/48hniR+d vqbsJMpSHffTM/Ox095/YuR8+EuImDMaxkPmvtytFlpWnAA/6t6xz+3s2wBO9CYOope3 /r+/x8ZldY2zR81Z3zCOMwEqj2cjSUay6ZVuMySXS6hWdyTsovoT8wmE+aWf4IBIIuHt W5Ow== X-Gm-Message-State: AOAM532IkCOtcZMLcXm70xRJVVhWjdJiukGsePNE5LK3kR2R8ltQY8xv bmGPRl28OdgV4zoXqKlZgfHgtg== X-Google-Smtp-Source: ABdhPJz6HWk5sB9nwfwdf1kQDcgkA+wqGy0z6ftS09yTJNkx6ybSS1PM3iIUUoGohfHi4XmFs5lz8A== X-Received: by 2002:a05:6402:1bce:b0:425:bfaf:f20c with SMTP id ch14-20020a0564021bce00b00425bfaff20cmr29534634edb.359.1651076070280; Wed, 27 Apr 2022 09:14:30 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id b17-20020aa7dc11000000b00412ae7fda95sm8583383edu.44.2022.04.27.09.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 09:14:29 -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 3/3] arm64: dts: sprd: use new 'dma-channels' property Date: Wed, 27 Apr 2022 18:14:23 +0200 Message-Id: <20220427161423.647534-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427161423.647534-1-krzysztof.kozlowski@linaro.org> References: <20220427161423.647534-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. Signed-off-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/sprd/whale2.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch/arm64/boot/dts/sprd/whale2.dtsi index 79b9591c37aa..945f0e02d364 100644 --- a/arch/arm64/boot/dts/sprd/whale2.dtsi +++ b/arch/arm64/boot/dts/sprd/whale2.dtsi @@ -126,7 +126,7 @@ ap_dma: dma-controller@20100000 { reg = <0 0x20100000 0 0x4000>; interrupts = ; #dma-cells = <1>; - #dma-channels = <32>; + dma-channels = <32>; clock-names = "enable"; clocks = <&apahb_gate CLK_DMA_EB>; }; @@ -272,7 +272,7 @@ agcp_dma: dma-controller@41580000 { compatible = "sprd,sc9860-dma"; reg = <0 0x41580000 0 0x4000>; #dma-cells = <1>; - #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>;