Skip to contentSkip to conversation

Add NVIDIA Tegra GPC-DMA driver

PATCH Superseded Akhil R 3 participants 17 messages Oct 28, 2021 – Nov 18, 2021

Subsystems (4)

v11 of 22 Superseded Latest is v22 →

lore
Share & tools
lore

Akhil R

author
#0 lore raw

v11 cover Add NVIDIA Tegra GPC-DMA driver

Add support for NVIDIA Tegra general purpose DMA driver for Tegra186 and Tegra194 platform.

Changes in patch v11:
* Removed unused label. Added description in doc
* Fixed dt_binding_check warnings.

v10 - https://lkml.org/lkml/2021/10/25/854

Akhil R (4):
dt-bindings: dmaengine: Add doc for tegra gpcdma
dmaengine: tegra: Add tegra gpcdma driver
arm64: defconfig: tegra: Enable GPCDMA
arm64: tegra: Add GPCDMA node for tegra186 and tegra194

 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      |  115 ++
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi     |    4 +
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           |   44 +
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi     |    4 +
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |   44 +
 arch/arm64/configs/defconfig                       |    1 +
 drivers/dma/Kconfig                                |   12 +
 drivers/dma/Makefile                               |    1 +
 drivers/dma/tegra186-gpc-dma.c                     | 1279 ++++++++++++++++++++
 9 files changed, 1504 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml
 create mode 100644 drivers/dma/tegra186-gpc-dma.c
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v11 1/4 dt-bindings: dmaengine: Add doc for tegra gpcdma

Add DT binding document for Nvidia Tegra GPCDMA controller.

---
 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      | 115 +++++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +115 -0
new file mode 100644
index 0000000..bc97efc
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nvidia,tegra186-gpc-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra GPC DMA Controller Device Tree Bindings
+
+description: |
+  The Tegra General Purpose Central (GPC) DMA controller is used for faster
+  data transfers between memory to memory, memory to device and device to
+  memory.
+
+maintainers:
+  - Jon Hunter <[email protected]>
+  - Rajesh Gumasta <[email protected]>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - nvidia,tegra186-gpcdma
+          - nvidia,tegra194-gpcdma
+      - items:
+          - const: nvidia,tegra186-gpcdma
+          - const: nvidia,tegra194-gpcdma
+
+  "#dma-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: |
+      Should contain all of the per-channel DMA interrupts in
+      ascending order with respect to the DMA channel index.
+    minItems: 1
+    maxItems: 32
+
+  resets:
+    description: |
+      Should contain the reset phandle for gpcdma.
+    maxItems: 1
+
+  reset-names:
+    const: gpcdma
+
+  iommus:
+    maxItems: 1
+
+  dma-coherent: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - resets
+  - reset-names
+  - "#dma-cells"
+  - iommus
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    dma-controller@2600000 {
+        compatible = "nvidia,tegra186-gpcdma";
+        reg = <0x2600000 0x0>;
+        resets = <&bpmp TEGRA186_RESET_GPCDMA>;
+        reset-names = "gpcdma";
+        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+        iommus = <&smmu TEGRA186_SID_GPCDMA_0>;
+        dma-coherent;
+    };
+...
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Re: [PATCH v11 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma

Quoted 35 lines · Akhil R

Add DT binding document for Nvidia Tegra GPCDMA controller.

---
 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      | 115 +++++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +19 -0
new file mode 100644
index 0000000..bc97efc
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nvidia,tegra186-gpc-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra GPC DMA Controller Device Tree Bindings
+
+description: |
+  The Tegra General Purpose Central (GPC) DMA controller is used for faster
+  data transfers between memory to memory, memory to device and device to
+  memory.
+
+maintainers:
+  - Jon Hunter <[email protected]>
+  - Rajesh Gumasta <[email protected]>
+
+allOf:
+  - $ref: "dma-controller.yaml#"

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +10 -0
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - nvidia,tegra186-gpcdma
+          - nvidia,tegra194-gpcdma
+      - items:
+          - const: nvidia,tegra186-gpcdma
+          - const: nvidia,tegra194-gpcdma

One of these is wrong. Either 186 has a fallback to 194 or it doesn't.

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml line 38

Quoted 9 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +9 -0
+
+  "#dma-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: |

Don't need '|' if there's no formatting.

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml line 46

Quoted 8 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +8 -0
+      Should contain all of the per-channel DMA interrupts in
+      ascending order with respect to the DMA channel index.
+    minItems: 1
+    maxItems: 32
+
+  resets:
+    description: |
+      Should contain the reset phandle for gpcdma.

Not really a useful description. Drop.

Quoted 73 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +69 -0
+    maxItems: 1
+
+  reset-names:
+    const: gpcdma
+
+  iommus:
+    maxItems: 1
+
+  dma-coherent: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - resets
+  - reset-names
+  - "#dma-cells"
+  - iommus
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    dma-controller@2600000 {
+        compatible = "nvidia,tegra186-gpcdma";
+        reg = <0x2600000 0x0>;
+        resets = <&bpmp TEGRA186_RESET_GPCDMA>;
+        reset-names = "gpcdma";
+        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+        iommus = <&smmu TEGRA186_SID_GPCDMA_0>;
+        dma-coherent;
+    };
+...
Signature · 1 line
2.7.4
author
#3 lore raw

RE: [PATCH v11 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma

Quoted 46 lines · Akhil R
Quoted 7 lines

Add DT binding document for Nvidia Tegra GPCDMA controller.

---
 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      | 115

+++++++++++++++++++++

Quoted 37 lines
 1 file changed, 115 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml

diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file mode 100644
index 0000000..bc97efc

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya new file +25 -0
+++ ml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nvidia,tegra186-gpc-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra GPC DMA Controller Device Tree Bindings
+
+description: |
+  The Tegra General Purpose Central (GPC) DMA controller is used for
+faster
+  data transfers between memory to memory, memory to device and
+device to
+  memory.
+
+maintainers:
+  - Jon Hunter <[email protected]>
+  - Rajesh Gumasta <[email protected]>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
Quoted 8 lines

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya line 30

Quoted 6 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya new file +6 -0
+      - enum:
+          - nvidia,tegra186-gpcdma
+          - nvidia,tegra194-gpcdma
+      - items:
+          - const: nvidia,tegra186-gpcdma
+          - const: nvidia,tegra194-gpcdma

One of these is wrong. Either 186 has a fallback to 194 or it doesn't.

Not sure if I understood this correctly. Tegra186 and 194 have different chip data inside driver based on the compatible. I guess, it then needs to be one of these. Or is the mistake something related to formatting?

Agreed with other comments.

--
nvpublic

maintainer
#4 lore raw

Re: [PATCH v11 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma

Quoted 55 lines · Akhil R
Quoted 47 lines · Akhil R
Quoted 7 lines

Add DT binding document for Nvidia Tegra GPCDMA controller.

---
 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      | 115

+++++++++++++++++++++

Quoted 37 lines
 1 file changed, 115 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml

diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file mode 100644
index 0000000..bc97efc

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya new file +25 -0
+++ ml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nvidia,tegra186-gpc-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra GPC DMA Controller Device Tree Bindings
+
+description: |
+  The Tegra General Purpose Central (GPC) DMA controller is used for
+faster
+  data transfers between memory to memory, memory to device and
+device to
+  memory.
+
+maintainers:
+  - Jon Hunter <[email protected]>
+  - Rajesh Gumasta <[email protected]>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
Quoted 8 lines

Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya line 30

Quoted 6 lines
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.ya new file +6 -0
+      - enum:
+          - nvidia,tegra186-gpcdma
+          - nvidia,tegra194-gpcdma
+      - items:
+          - const: nvidia,tegra186-gpcdma
+          - const: nvidia,tegra194-gpcdma

One of these is wrong. Either 186 has a fallback to 194 or it doesn't.

Quoted 3 lines

Not sure if I understood this correctly. Tegra186 and 194 have different chip data inside driver based on the compatible. I guess, it then needs to be one of these. Or is the mistake something related to formatting?

It's not about what the driver uses, but what is valid in a DT file. Either you say the 2 implementations are different and in no way compatible with each other:

enum:
- nvidia,tegra186-gpcdma
- nvidia,tegra194-gpcdma

Or you say 186 is backwards compatible with 194 (meaning 186 is a superset of 194 so a driver written for 194 still works on 186 (though not any new features)).

oneOf:
- const: nvidia,tegra194-gpcdma
- items:
- const: nvidia,tegra186-gpcdma
- const: nvidia,tegra194-gpcdma

Rob

author
#5 lore raw

PATCH v11 2/4 dmaengine: tegra: Add tegra gpcdma driver

In reply to Akhil R

Adding GPC DMA controller driver for Tegra186 and Tegra194. The driver supports dma transfers between memory to memory, IO peripheral to memory and memory to IO peripheral.

---
 drivers/dma/Kconfig            |   12 +
 drivers/dma/Makefile           |    1 +
 drivers/dma/tegra186-gpc-dma.c | 1279 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1292 insertions(+)
 create mode 100644 drivers/dma/tegra186-gpc-dma.c
drivers/dma/Kconfig +12 -0
index 80c2c03..35095ae 100644
@@ -629,6 +629,18 @@ config TXX9_DMAC
 	  Support the TXx9 SoC internal DMA controller.  This can be
 	  integrated in chips such as the Toshiba TX4927/38/39.
 
+config TEGRA186_GPC_DMA
+	tristate "NVIDIA Tegra GPC DMA support"
+	depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || COMPILE_TEST
+	select DMA_ENGINE
+	help
+	  Support for the NVIDIA Tegra186 and Tegra194 GPC DMA controller
+	  driver. The DMA controller has multiple DMA channels which can
+	  be configured for different peripherals like UART, SPI, etc
+	  which are on APB bus.
+	  This DMA controller transfers data from memory to peripheral FIFO
+	  or vice versa. It also supports memory to memory data transfer.
+
 config TEGRA20_APB_DMA
 	tristate "NVIDIA Tegra20 APB DMA support"
 	depends on ARCH_TEGRA || COMPILE_TEST
drivers/dma/Makefile +1 -0
index 616d926..2f1b87f 100644
@@ -72,6 +72,7 @@ obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o
 obj-$(CONFIG_SPRD_DMA) += sprd-dma.o
 obj-$(CONFIG_S3C24XX_DMAC) += s3c24xx-dma.o
 obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o
+obj-$(CONFIG_TEGRA186_GPC_DMA) += tegra186-gpc-dma.o
 obj-$(CONFIG_TEGRA20_APB_DMA) += tegra20-apb-dma.o
 obj-$(CONFIG_TEGRA210_ADMA) += tegra210-adma.o
 obj-$(CONFIG_TIMB_DMA) += timb_dma.o
drivers/dma/tegra186-gpc-dma.c new file +1279 -0

1,279 lines not on this page · raw message

Signature · 1 line
2.7.4
#6 lore raw

Re: [PATCH v11 2/4] dmaengine: tegra: Add tegra gpcdma driver

Thank you for the patch! Perhaps something to improve:

Hi Akhil,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on vkoul-dmaengine/next arm64/for-next/core v5.15-rc7 next-20211028] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20211028-212920
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/020f86b695432467db8b697540871173f6d751c8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20211028-212920 git checkout 020f86b695432467db8b697540871173f6d751c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_reserve':

>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Wswitch]
     299 |         switch (direction) {
         |         ^~~~~~
>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Wswitch]
>> drivers/dma/tegra186-gpc-dma.c:299:9: warning: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Wswitch]
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_free':
   drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Wswitch]
     324 |         switch (tdc->sid_dir) {
         |         ^~~~~~
   drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Wswitch]
   drivers/dma/tegra186-gpc-dma.c:324:9: warning: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Wswitch]
   In file included from drivers/dma/tegra186-gpc-dma.c:8:
   drivers/dma/tegra186-gpc-dma.c: In function 'get_burst_size':
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   In file included from include/linux/minmax.h:5,
                    from drivers/dma/tegra186-gpc-dma.c:8:
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/const.h:12:55: note: in definition of macro '__is_constexpr'
      12 |         (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
         |                                                       ^
   include/linux/minmax.h:26:39: note: in expansion of macro '__no_side_effects'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                                       ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   In file included from drivers/dma/tegra186-gpc-dma.c:8:
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:28:27: note: in definition of macro '__cmp'
      28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
         |                           ^
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)

vim +/DMA_MEM_TO_MEM +299 drivers/dma/tegra186-gpc-dma.c

289
290 static int tegra_dma_sid_reserve(struct tegra_dma_channel *tdc,
291 enum dma_transfer_direction direction)
292 {
293 struct tegra_dma *tdma = tdc->tdma;
294 unsigned int sid = tdc->slave_id;
295
296 if (!is_slave_direction(direction))
297 return 0;
298

 > 299		switch (direction) {

300 case DMA_MEM_TO_DEV:
301 if (test_and_set_bit(sid, &tdma->sid_m2d_reserved)) {
302 dev_err(tdma->dev, "slave id already in use\n");
303 return -EINVAL;
304 }
305 break;
306 case DMA_DEV_TO_MEM:
307 if (test_and_set_bit(sid, &tdma->sid_d2m_reserved)) {
308 dev_err(tdma->dev, "slave id already in use\n");
309 return -EINVAL;
310 }
311 break;
312 }
313
314 tdc->sid_dir = direction;
315
316 return 0;
317 }
318

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#7 lore raw

Re: [PATCH v11 2/4] dmaengine: tegra: Add tegra gpcdma driver

In reply to Akhil R
Thank you for the patch! Perhaps something to improve:

Hi Akhil,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on vkoul-dmaengine/next arm64/for-next/core v5.15-rc7 next-20211029] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20211028-212920
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: openrisc-randconfig-r031-20211029 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/020f86b695432467db8b697540871173f6d751c8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20211028-212920 git checkout 020f86b695432467db8b697540871173f6d751c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

include/linux/minmax.h:89:28: note: in expansion of macro 'min'

      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:28:40: note: in definition of macro '__cmp'
      28 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
         |                                        ^
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:31:24: note: in definition of macro '__cmp_once'
      31 |                 typeof(x) unique_x = (x);               \
         |                        ^
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^~
   include/linux/minmax.h:31:39: note: in definition of macro '__cmp_once'
      31 |                 typeof(x) unique_x = (x);               \
         |                                       ^
   include/linux/minmax.h:45:25: note: in expansion of macro '__careful_cmp'
      45 | #define min(x, y)       __careful_cmp(x, y, <)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:28: note: in expansion of macro 'min'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                            ^~~
   include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
      52 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~
   include/linux/minmax.h:89:45: note: in expansion of macro 'max'
      89 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
         |                                             ^~~
   drivers/dma/tegra186-gpc-dma.c:692:9: note: in expansion of macro 'clamp'
     692 |         clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
         |         ^~~~~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memset':
>> drivers/dma/tegra186-gpc-dma.c:785:74: warning: right shift count >= width of type [-Wshift-count-overflow]
     785 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                          ^~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memcpy':
   drivers/dma/tegra186-gpc-dma.c:852:65: warning: right shift count >= width of type [-Wshift-count-overflow]
     852 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                                                                 ^~
   drivers/dma/tegra186-gpc-dma.c:854:66: warning: right shift count >= width of type [-Wshift-count-overflow]
     854 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                  ^~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_slave_sg':
   drivers/dma/tegra186-gpc-dma.c:960:81: warning: right shift count >= width of type [-Wshift-count-overflow]
     960 |                                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
         |                                                                                 ^~
   drivers/dma/tegra186-gpc-dma.c:965:81: warning: right shift count >= width of type [-Wshift-count-overflow]
     965 |                                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
         |                                                                                 ^~

cc1: some warnings being treated as errors

vim +785 drivers/dma/tegra186-gpc-dma.c

676
677 static unsigned int get_burst_size(struct tegra_dma_channel *tdc,
678 u32 burst_size, enum dma_slave_buswidth slave_bw,
679 int len)
680 {
681 unsigned int burst_mmio_width, burst_byte;
682
683 /*
684 * burst_size from client is in terms of the bus_width.
685 * convert that into words.
686 * If burst_size is not specified from client, then use
687 * len to calculate the optimum burst size
688 */
689 burst_byte = burst_size ? burst_size * slave_bw : len;
690 burst_mmio_width = burst_byte / 4;
691

 > 692		clamp(burst_mmio_width, TEGRA_GPCDMA_MMIOSEQ_BURST_MIN,
   693		      TEGRA_GPCDMA_MMIOSEQ_BURST_MAX);
   694	
   695		return (fls(burst_mmio_width) - 1) << TEGRA_GPCDMA_MMIOSEQ_BURST_SHIFT;
   696	}
   697	
   698	static int get_transfer_param(struct tegra_dma_channel *tdc,
   699				      enum dma_transfer_direction direction,
   700				      unsigned long *apb_addr,
   701				      unsigned long *mmio_seq,
   702				      unsigned long *csr,
   703				      unsigned int *burst_size,
   704				      enum dma_slave_buswidth *slave_bw)
   705	{
   706		switch (direction) {
   707		case DMA_MEM_TO_DEV:
   708			*apb_addr = tdc->dma_sconfig.dst_addr;
   709			*mmio_seq = get_bus_width(tdc, tdc->dma_sconfig.dst_addr_width);
   710			*burst_size = tdc->dma_sconfig.dst_maxburst;
   711			*slave_bw = tdc->dma_sconfig.dst_addr_width;
   712			*csr = TEGRA_GPCDMA_CSR_DMA_MEM2IO_FC;
   713			return 0;
   714		case DMA_DEV_TO_MEM:
   715			*apb_addr = tdc->dma_sconfig.src_addr;
   716			*mmio_seq = get_bus_width(tdc, tdc->dma_sconfig.src_addr_width);
   717			*burst_size = tdc->dma_sconfig.src_maxburst;
   718			*slave_bw = tdc->dma_sconfig.src_addr_width;
   719			*csr = TEGRA_GPCDMA_CSR_DMA_IO2MEM_FC;
   720			return 0;
   721		case DMA_MEM_TO_MEM:
   722			*burst_size = tdc->dma_sconfig.src_addr_width;
   723			*csr = TEGRA_GPCDMA_CSR_DMA_MEM2MEM;
   724			return 0;
   725		default:
   726			dev_err(tdc2dev(tdc), "DMA direction is not supported\n");
   727		}
   728	
   729		return -EINVAL;
   730	}
   731	
   732	static struct dma_async_tx_descriptor *
   733	tegra_dma_prep_dma_memset(struct dma_chan *dc, dma_addr_t dest, int value,
   734				  size_t len, unsigned long flags)
   735	{
   736		struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
   737		unsigned int max_dma_count = tdc->tdma->chip_data->max_dma_count;
   738		struct tegra_dma_desc *dma_desc;
   739		unsigned long csr, mc_seq;
   740	
   741		if ((len & 3) || (dest & 3) || len > max_dma_count) {
   742			dev_err(tdc2dev(tdc),
   743				"DMA length/memory address is not supported\n");
   744			return NULL;
   745		}
   746	
   747		/* Set dma mode to fixed pattern */
   748		csr = TEGRA_GPCDMA_CSR_DMA_FIXED_PAT;
   749		/* Enable once or continuous mode */
   750		csr |= TEGRA_GPCDMA_CSR_ONCE;
   751		/* Enable IRQ mask */
   752		csr |= TEGRA_GPCDMA_CSR_IRQ_MASK;
   753		/* Enable the dma interrupt */
   754		if (flags & DMA_PREP_INTERRUPT)
   755			csr |= TEGRA_GPCDMA_CSR_IE_EOC;
   756		/* Configure default priority weight for the channel */
   757		csr |= FIELD_PREP(TEGRA_GPCDMA_CSR_WEIGHT, 1);
   758	
   759		mc_seq =  tdc_read(tdc, TEGRA_GPCDMA_CHAN_MCSEQ);
   760		/* retain stream-id and clean rest */
   761		mc_seq &= TEGRA_GPCDMA_MCSEQ_STREAM_ID0_MASK;
   762	
   763		/* Set the address wrapping */
   764		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP0,
   765							TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
   766		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_WRAP1,
   767							TEGRA_GPCDMA_MCSEQ_WRAP_NONE);
   768	
   769		/* Program outstanding MC requests */
   770		mc_seq |= FIELD_PREP(TEGRA_GPCDMA_MCSEQ_REQ_COUNT, 1);
   771		/* Set burst size */
   772		mc_seq |= TEGRA_GPCDMA_MCSEQ_BURST_16;
   773	
   774		dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
   775		if (!dma_desc)
   776			return NULL;
   777	
   778		dma_desc->bytes_requested = 0;
   779		dma_desc->bytes_transferred = 0;
   780	
   781		dma_desc->bytes_requested += len;
   782		tdc->ch_regs.src_ptr = 0;
   783		tdc->ch_regs.dst_ptr = dest;
   784		tdc->ch_regs.high_addr_ptr =
 > 785				FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));

786 tdc->ch_regs.fixed_pattern = value;
787 /* Word count reg takes value as (N +1) words */
788 tdc->ch_regs.wcount = ((len - 4) >> 2);
789 tdc->ch_regs.csr = csr;
790 tdc->ch_regs.mmio_seq = 0;
791 tdc->ch_regs.mc_seq = mc_seq;
792
793 tdc->dma_desc = dma_desc;
794
795 return vchan_tx_prep(&tdc->vc, &dma_desc->vd, flags);
796 }
797

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

author
#8 lore raw

PATCH v11 3/4 arm64: defconfig: tegra: Enable GPCDMA

In reply to Akhil R

Enable TEGRA_GPC_DMA in defconfig for Tegra186 and Tegra196 gpc dma controller driver

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 156d96a..6616148 100644
@@ -928,6 +928,7 @@ CONFIG_MV_XOR=y
 CONFIG_MV_XOR_V2=y
 CONFIG_OWL_DMA=y
 CONFIG_PL330_DMA=y
+CONFIG_TEGRA186_GPC_DMA=m
 CONFIG_TEGRA20_APB_DMA=y
 CONFIG_TEGRA210_ADMA=m
 CONFIG_QCOM_BAM_DMA=y
Signature · 1 line
2.7.4
author
#9 lore raw

PATCH v11 4/4 arm64: tegra: Add GPCDMA node for tegra186 and tegra194

In reply to Akhil R

Add device tree node for GPCDMA controller on Tegra186 target and Tegra194 target.

---
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi |  4 +++
 arch/arm64/boot/dts/nvidia/tegra186.dtsi       | 44 ++++++++++++++++++++++++++
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi |  4 +++
 arch/arm64/boot/dts/nvidia/tegra194.dtsi       | 44 ++++++++++++++++++++++++++
 4 files changed, 96 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +4 -0
index fcd71bf..f5ef04d3 100644
@@ -56,6 +56,10 @@
 		};
 	};
 
+	dma-controller@2600000 {
+		status = "okay";
+	};
+
 	memory-controller@2c00000 {
 		status = "okay";
 	};
arch/arm64/boot/dts/nvidia/tegra186.dtsi +44 -0

50 lines not on this page · raw message

arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +4 -0
index c4058ee..5bc74af 100644
@@ -49,6 +49,10 @@
 			};
 		};
 
+		dma-controller@2600000 {
+			status = "okay";
+		};
+
 		memory-controller@2c00000 {
 			status = "okay";
 		};
arch/arm64/boot/dts/nvidia/tegra194.dtsi +44 -0

50 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#10 lore raw

v12 cover Add NVIDIA Tegra GPC-DMA driver

In reply to Akhil R

Add support for NVIDIA Tegra general purpose DMA driver for Tegra186 and Tegra194 platform.

Changes in patch v11:
* corrections in dt-binding doc
* fixes for warnings reported-by: kernel test robot <[email protected]>

v11 - https://lkml.org/lkml/2021/10/28/454

Akhil R (4):
dt-bindings: dmaengine: Add doc for tegra gpcdma
dmaengine: tegra: Add tegra gpcdma driver
arm64: defconfig: tegra: Enable GPCDMA
arm64: tegra: Add GPCDMA node for tegra186 and tegra194

 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      |  113 ++
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi     |    4 +
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           |   44 +
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi     |    4 +
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |   44 +
 arch/arm64/configs/defconfig                       |    1 +
 drivers/dma/Kconfig                                |   12 +
 drivers/dma/Makefile                               |    1 +
 drivers/dma/tegra186-gpc-dma.c                     | 1281 ++++++++++++++++++++
 9 files changed, 1504 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml
 create mode 100644 drivers/dma/tegra186-gpc-dma.c
Signature · 1 line
2.7.4
author
#11 lore raw

PATCH v12 1/4 dt-bindings: dmaengine: Add doc for tegra gpcdma

Add DT binding document for Nvidia Tegra GPCDMA controller.

---
 .../bindings/dma/nvidia,tegra186-gpc-dma.yaml      | 113 +++++++++++++++++++++
 1 file changed, 113 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml
Documentation/devicetree/bindings/dma/nvidia,tegra186-gpc-dma.yaml new file +113 -0
new file mode 100644
index 0000000..f2d63d7
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nvidia,tegra186-gpc-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra GPC DMA Controller Device Tree Bindings
+
+description:
+  The Tegra General Purpose Central (GPC) DMA controller is used for faster
+  data transfers between memory to memory, memory to device and device to
+  memory.
+
+maintainers:
+  - Jon Hunter <[email protected]>
+  - Rajesh Gumasta <[email protected]>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - nvidia,tegra186-gpcdma
+          - nvidia,tegra194-gpcdma
+      - items:
+          - const: nvidia,tegra186-gpcdma
+          - const: nvidia,tegra194-gpcdma
+
+  "#dma-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      Should contain all of the per-channel DMA interrupts in
+      ascending order with respect to the DMA channel index.
+    minItems: 1
+    maxItems: 32
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: gpcdma
+
+  iommus:
+    maxItems: 1
+
+  dma-coherent: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - resets
+  - reset-names
+  - "#dma-cells"
+  - iommus
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/memory/tegra186-mc.h>
+    #include <dt-bindings/reset/tegra186-reset.h>
+
+    dma-controller@2600000 {
+        compatible = "nvidia,tegra186-gpcdma";
+        reg = <0x2600000 0x0>;
+        resets = <&bpmp TEGRA186_RESET_GPCDMA>;
+        reset-names = "gpcdma";
+        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+        iommus = <&smmu TEGRA186_SID_GPCDMA_0>;
+        dma-coherent;
+    };
+...
Signature · 1 line
2.7.4
author
#12 lore raw

PATCH v12 2/4 dmaengine: tegra: Add tegra gpcdma driver

In reply to Akhil R

Adding GPC DMA controller driver for Tegra186 and Tegra194. The driver supports dma transfers between memory to memory, IO peripheral to memory and memory to IO peripheral.

---
 drivers/dma/Kconfig            |   12 +
 drivers/dma/Makefile           |    1 +
 drivers/dma/tegra186-gpc-dma.c | 1281 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1294 insertions(+)
 create mode 100644 drivers/dma/tegra186-gpc-dma.c
drivers/dma/Kconfig +12 -0
index 80c2c03..35095ae 100644
@@ -629,6 +629,18 @@ config TXX9_DMAC
 	  Support the TXx9 SoC internal DMA controller.  This can be
 	  integrated in chips such as the Toshiba TX4927/38/39.
 
+config TEGRA186_GPC_DMA
+	tristate "NVIDIA Tegra GPC DMA support"
+	depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || COMPILE_TEST
+	select DMA_ENGINE
+	help
+	  Support for the NVIDIA Tegra186 and Tegra194 GPC DMA controller
+	  driver. The DMA controller has multiple DMA channels which can
+	  be configured for different peripherals like UART, SPI, etc
+	  which are on APB bus.
+	  This DMA controller transfers data from memory to peripheral FIFO
+	  or vice versa. It also supports memory to memory data transfer.
+
 config TEGRA20_APB_DMA
 	tristate "NVIDIA Tegra20 APB DMA support"
 	depends on ARCH_TEGRA || COMPILE_TEST
drivers/dma/Makefile +1 -0
index 616d926..2f1b87f 100644
@@ -72,6 +72,7 @@ obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o
 obj-$(CONFIG_SPRD_DMA) += sprd-dma.o
 obj-$(CONFIG_S3C24XX_DMAC) += s3c24xx-dma.o
 obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o
+obj-$(CONFIG_TEGRA186_GPC_DMA) += tegra186-gpc-dma.o
 obj-$(CONFIG_TEGRA20_APB_DMA) += tegra20-apb-dma.o
 obj-$(CONFIG_TEGRA210_ADMA) += tegra210-adma.o
 obj-$(CONFIG_TIMB_DMA) += timb_dma.o
drivers/dma/tegra186-gpc-dma.c new file +1281 -0

1,281 lines not on this page · raw message

Signature · 1 line
2.7.4
#13 lore raw

Re: [PATCH v12 2/4] dmaengine: tegra: Add tegra gpcdma driver

Thank you for the patch! Yet something to improve:

Hi Akhil,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on vkoul-dmaengine/next arm64/for-next/core v5.15 next-20211112] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Akhil-R/dt-bindings-dmaengine-Add-doc-for-tegra-gpcdma/20211109-233646
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/faf61a8fc90e3ea731c65a8cebce3eb6c0444d21
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/dt-bindings-dmaengine-Add-doc-for-tegra-gpcdma/20211109-233646 git checkout faf61a8fc90e3ea731c65a8cebce3eb6c0444d21
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_free':

>> drivers/dma/tegra186-gpc-dma.c:326:9: error: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Werror=switch]
     326 |         switch (tdc->sid_dir) {
         |         ^~~~~~
>> drivers/dma/tegra186-gpc-dma.c:326:9: error: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Werror=switch]
>> drivers/dma/tegra186-gpc-dma.c:326:9: error: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Werror=switch]
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_reset_client':
>> drivers/dma/tegra186-gpc-dma.c:55:41: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
      55 |                                         FIELD_PREP(TEGRA_GPCDMA_CSR_REQ_SEL_MASK, 4)
         |                                         ^~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:535:16: note: in expansion of macro 'TEGRA_GPCDMA_CSR_REQ_SEL_UNUSED'
     535 |         csr |= TEGRA_GPCDMA_CSR_REQ_SEL_UNUSED;
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memset':
>> drivers/dma/tegra186-gpc-dma.c:787:74: error: right shift count >= width of type [-Werror=shift-count-overflow]
     787 |                         FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                          ^~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memcpy':
   drivers/dma/tegra186-gpc-dma.c:854:65: error: right shift count >= width of type [-Werror=shift-count-overflow]
     854 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (src >> 32));
         |                                                                 ^~
   drivers/dma/tegra186-gpc-dma.c:856:66: error: right shift count >= width of type [-Werror=shift-count-overflow]
     856 |                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> 32));
         |                                                                  ^~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_slave_sg':
   drivers/dma/tegra186-gpc-dma.c:962:81: error: right shift count >= width of type [-Werror=shift-count-overflow]
     962 |                                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
         |                                                                                 ^~
   drivers/dma/tegra186-gpc-dma.c:967:81: error: right shift count >= width of type [-Werror=shift-count-overflow]
     967 |                                 FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
         |                                                                                 ^~

cc1: all warnings being treated as errors

vim +/DMA_MEM_TO_MEM +326 drivers/dma/tegra186-gpc-dma.c

320
321 static void tegra_dma_sid_free(struct tegra_dma_channel *tdc)
322 {
323 struct tegra_dma *tdma = tdc->tdma;
324 unsigned int sid = tdc->slave_id;
325

 > 326		switch (tdc->sid_dir) {

327 case DMA_MEM_TO_DEV:
328 clear_bit(sid, &tdma->sid_m2d_reserved);
329 break;
330 case DMA_DEV_TO_MEM:
331 clear_bit(sid, &tdma->sid_d2m_reserved);
332 break;
333 }
334
335 tdc->sid_dir = DMA_TRANS_NONE;
336 }
337

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#14 lore raw

Re: [PATCH v12 2/4] dmaengine: tegra: Add tegra gpcdma driver

In reply to Akhil R
Thank you for the patch! Yet something to improve:

Hi Akhil,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on vkoul-dmaengine/next arm64/for-next/core v5.16-rc1 next-20211117] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Akhil-R/dt-bindings-dmaengine-Add-doc-for-tegra-gpcdma/20211109-233646
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: sparc64-randconfig-p002-20211115 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/faf61a8fc90e3ea731c65a8cebce3eb6c0444d21
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/dt-bindings-dmaengine-Add-doc-for-tegra-gpcdma/20211109-233646 git checkout faf61a8fc90e3ea731c65a8cebce3eb6c0444d21
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc64

If you fix the issue, kindly add following tag as appropriate

All error/warnings (new ones prefixed by >>):

drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_sid_free':
drivers/dma/tegra186-gpc-dma.c:326:9: warning: enumeration value 'DMA_MEM_TO_MEM' not handled in switch [-Wswitch]

     326 |         switch (tdc->sid_dir) {
         |         ^~~~~~
   drivers/dma/tegra186-gpc-dma.c:326:9: warning: enumeration value 'DMA_DEV_TO_DEV' not handled in switch [-Wswitch]
   drivers/dma/tegra186-gpc-dma.c:326:9: warning: enumeration value 'DMA_TRANS_NONE' not handled in switch [-Wswitch]
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_desc_free':
>> drivers/dma/tegra186-gpc-dma.c:340:9: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     340 |         kfree(container_of(vd, struct tegra_dma_desc, vd));
         |         ^~~~~
         |         kvfree
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_reset_client':
   drivers/dma/tegra186-gpc-dma.c:55:41: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
      55 |                                         FIELD_PREP(TEGRA_GPCDMA_CSR_REQ_SEL_MASK, 4)
         |                                         ^~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c:535:16: note: in expansion of macro 'TEGRA_GPCDMA_CSR_REQ_SEL_UNUSED'
     535 |         csr |= TEGRA_GPCDMA_CSR_REQ_SEL_UNUSED;
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memset':
>> drivers/dma/tegra186-gpc-dma.c:776:20: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
     776 |         dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
         |                    ^~~~~~~
         |                    kvzalloc
>> drivers/dma/tegra186-gpc-dma.c:776:18: warning: assignment to 'struct tegra_dma_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     776 |         dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
         |                  ^
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_dma_memcpy':
   drivers/dma/tegra186-gpc-dma.c:843:18: warning: assignment to 'struct tegra_dma_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     843 |         dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
         |                  ^
   drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_prep_slave_sg':
   drivers/dma/tegra186-gpc-dma.c:932:18: warning: assignment to 'struct tegra_dma_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     932 |         dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
         |                  ^

cc1: some warnings being treated as errors

vim +340 drivers/dma/tegra186-gpc-dma.c

320
321 static void tegra_dma_sid_free(struct tegra_dma_channel *tdc)
322 {
323 struct tegra_dma *tdma = tdc->tdma;
324 unsigned int sid = tdc->slave_id;
325

 > 326		switch (tdc->sid_dir) {
   327		case DMA_MEM_TO_DEV:
   328			clear_bit(sid,  &tdma->sid_m2d_reserved);
   329			break;
   330		case DMA_DEV_TO_MEM:
   331			clear_bit(sid,  &tdma->sid_d2m_reserved);
   332			break;
   333		}
   334	
   335		tdc->sid_dir = DMA_TRANS_NONE;
   336	}
   337	
   338	static void tegra_dma_desc_free(struct virt_dma_desc *vd)
   339	{
 > 340		kfree(container_of(vd, struct tegra_dma_desc, vd));

341 }
342

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

author
#15 lore raw

PATCH v12 3/4 arm64: defconfig: tegra: Enable GPCDMA

In reply to Akhil R

Enable TEGRA_GPC_DMA in defconfig for Tegra186 and Tegra196 gpc dma controller driver

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 156d96a..6616148 100644
@@ -928,6 +928,7 @@ CONFIG_MV_XOR=y
 CONFIG_MV_XOR_V2=y
 CONFIG_OWL_DMA=y
 CONFIG_PL330_DMA=y
+CONFIG_TEGRA186_GPC_DMA=m
 CONFIG_TEGRA20_APB_DMA=y
 CONFIG_TEGRA210_ADMA=m
 CONFIG_QCOM_BAM_DMA=y
Signature · 1 line
2.7.4
author
#16 lore raw

PATCH v12 4/4 arm64: tegra: Add GPCDMA node for tegra186 and tegra194

In reply to Akhil R

Add device tree node for GPCDMA controller on Tegra186 target and Tegra194 target.

---
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi |  4 +++
 arch/arm64/boot/dts/nvidia/tegra186.dtsi       | 44 ++++++++++++++++++++++++++
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi |  4 +++
 arch/arm64/boot/dts/nvidia/tegra194.dtsi       | 44 ++++++++++++++++++++++++++
 4 files changed, 96 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +4 -0
index fcd71bf..f5ef04d3 100644
@@ -56,6 +56,10 @@
 		};
 	};
 
+	dma-controller@2600000 {
+		status = "okay";
+	};
+
 	memory-controller@2c00000 {
 		status = "okay";
 	};
arch/arm64/boot/dts/nvidia/tegra186.dtsi +44 -0

50 lines not on this page · raw message

arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +4 -0
index c4058ee..5bc74af 100644
@@ -49,6 +49,10 @@
 			};
 		};
 
+		dma-controller@2600000 {
+			status = "okay";
+		};
+
 		memory-controller@2c00000 {
 			status = "okay";
 		};
arch/arm64/boot/dts/nvidia/tegra194.dtsi +44 -0

50 lines not on this page · raw message

Signature · 1 line
2.7.4