aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2014-12-16 16:59:56 -0500
committerMaxime Ripard <maxime.ripard@free-electrons.com>2015-01-21 03:58:56 -0500
commit1f9f6a78735f56f5d718565b235c7e0188933e2d (patch)
tree1e08d2ad8b49aa097035d2e40dbd297466aab626
parentbca12924f09dc03f2bda3b3e39408fee920a343b (diff)
ARM: sunxi: DT: Convert the DTs to use a header for the DMA arguments
The DMA engine for the A10/A20 and derivatives require an opaque extra argument. Add a dt-bindings header, and convert the device trees to it. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--arch/arm/boot/dts/sun4i-a10.dtsi14
-rw-r--r--arch/arm/boot/dts/sun5i-a10s.dtsi11
-rw-r--r--arch/arm/boot/dts/sun5i-a13.dtsi11
-rw-r--r--arch/arm/boot/dts/sun7i-a20.dtsi14
-rw-r--r--include/dt-bindings/dma/sun4i-a10.h56
5 files changed, 92 insertions, 14 deletions
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 94283a5fa77c..fb413e49fa42 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -12,6 +12,8 @@
12 12
13#include "skeleton.dtsi" 13#include "skeleton.dtsi"
14 14
15#include <dt-bindings/dma/sun4i-a10.h>
16
15/ { 17/ {
16 interrupt-parent = <&intc>; 18 interrupt-parent = <&intc>;
17 19
@@ -367,7 +369,8 @@
367 interrupts = <10>; 369 interrupts = <10>;
368 clocks = <&ahb_gates 20>, <&spi0_clk>; 370 clocks = <&ahb_gates 20>, <&spi0_clk>;
369 clock-names = "ahb", "mod"; 371 clock-names = "ahb", "mod";
370 dmas = <&dma 1 27>, <&dma 1 26>; 372 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
373 <&dma SUN4I_DMA_DEDICATED 26>;
371 dma-names = "rx", "tx"; 374 dma-names = "rx", "tx";
372 status = "disabled"; 375 status = "disabled";
373 #address-cells = <1>; 376 #address-cells = <1>;
@@ -380,7 +383,8 @@
380 interrupts = <11>; 383 interrupts = <11>;
381 clocks = <&ahb_gates 21>, <&spi1_clk>; 384 clocks = <&ahb_gates 21>, <&spi1_clk>;
382 clock-names = "ahb", "mod"; 385 clock-names = "ahb", "mod";
383 dmas = <&dma 1 9>, <&dma 1 8>; 386 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
387 <&dma SUN4I_DMA_DEDICATED 8>;
384 dma-names = "rx", "tx"; 388 dma-names = "rx", "tx";
385 status = "disabled"; 389 status = "disabled";
386 #address-cells = <1>; 390 #address-cells = <1>;
@@ -477,7 +481,8 @@
477 interrupts = <12>; 481 interrupts = <12>;
478 clocks = <&ahb_gates 22>, <&spi2_clk>; 482 clocks = <&ahb_gates 22>, <&spi2_clk>;
479 clock-names = "ahb", "mod"; 483 clock-names = "ahb", "mod";
480 dmas = <&dma 1 29>, <&dma 1 28>; 484 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
485 <&dma SUN4I_DMA_DEDICATED 28>;
481 dma-names = "rx", "tx"; 486 dma-names = "rx", "tx";
482 status = "disabled"; 487 status = "disabled";
483 #address-cells = <1>; 488 #address-cells = <1>;
@@ -518,7 +523,8 @@
518 interrupts = <50>; 523 interrupts = <50>;
519 clocks = <&ahb_gates 23>, <&spi3_clk>; 524 clocks = <&ahb_gates 23>, <&spi3_clk>;
520 clock-names = "ahb", "mod"; 525 clock-names = "ahb", "mod";
521 dmas = <&dma 1 31>, <&dma 1 30>; 526 dmas = <&dma SUN4I_DMA_DEDICATED 31>,
527 <&dma SUN4I_DMA_DEDICATED 30>;
522 dma-names = "rx", "tx"; 528 dma-names = "rx", "tx";
523 status = "disabled"; 529 status = "disabled";
524 #address-cells = <1>; 530 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 452b774332cc..d0b7182e6fdd 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -13,6 +13,8 @@
13 13
14#include "skeleton.dtsi" 14#include "skeleton.dtsi"
15 15
16#include <dt-bindings/dma/sun4i-a10.h>
17
16/ { 18/ {
17 interrupt-parent = <&intc>; 19 interrupt-parent = <&intc>;
18 20
@@ -320,7 +322,8 @@
320 interrupts = <10>; 322 interrupts = <10>;
321 clocks = <&ahb_gates 20>, <&spi0_clk>; 323 clocks = <&ahb_gates 20>, <&spi0_clk>;
322 clock-names = "ahb", "mod"; 324 clock-names = "ahb", "mod";
323 dmas = <&dma 1 27>, <&dma 1 26>; 325 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
326 <&dma SUN4I_DMA_DEDICATED 26>;
324 dma-names = "rx", "tx"; 327 dma-names = "rx", "tx";
325 status = "disabled"; 328 status = "disabled";
326 #address-cells = <1>; 329 #address-cells = <1>;
@@ -333,7 +336,8 @@
333 interrupts = <11>; 336 interrupts = <11>;
334 clocks = <&ahb_gates 21>, <&spi1_clk>; 337 clocks = <&ahb_gates 21>, <&spi1_clk>;
335 clock-names = "ahb", "mod"; 338 clock-names = "ahb", "mod";
336 dmas = <&dma 1 9>, <&dma 1 8>; 339 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
340 <&dma SUN4I_DMA_DEDICATED 8>;
337 dma-names = "rx", "tx"; 341 dma-names = "rx", "tx";
338 status = "disabled"; 342 status = "disabled";
339 #address-cells = <1>; 343 #address-cells = <1>;
@@ -421,7 +425,8 @@
421 interrupts = <12>; 425 interrupts = <12>;
422 clocks = <&ahb_gates 22>, <&spi2_clk>; 426 clocks = <&ahb_gates 22>, <&spi2_clk>;
423 clock-names = "ahb", "mod"; 427 clock-names = "ahb", "mod";
424 dmas = <&dma 1 29>, <&dma 1 28>; 428 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
429 <&dma SUN4I_DMA_DEDICATED 28>;
425 dma-names = "rx", "tx"; 430 dma-names = "rx", "tx";
426 status = "disabled"; 431 status = "disabled";
427 #address-cells = <1>; 432 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 93f1c8435019..43441fc3b1a1 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -13,6 +13,8 @@
13 13
14#include "skeleton.dtsi" 14#include "skeleton.dtsi"
15 15
16#include <dt-bindings/dma/sun4i-a10.h>
17
16/ { 18/ {
17 interrupt-parent = <&intc>; 19 interrupt-parent = <&intc>;
18 20
@@ -304,7 +306,8 @@
304 interrupts = <10>; 306 interrupts = <10>;
305 clocks = <&ahb_gates 20>, <&spi0_clk>; 307 clocks = <&ahb_gates 20>, <&spi0_clk>;
306 clock-names = "ahb", "mod"; 308 clock-names = "ahb", "mod";
307 dmas = <&dma 1 27>, <&dma 1 26>; 309 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
310 <&dma SUN4I_DMA_DEDICATED 26>;
308 dma-names = "rx", "tx"; 311 dma-names = "rx", "tx";
309 status = "disabled"; 312 status = "disabled";
310 #address-cells = <1>; 313 #address-cells = <1>;
@@ -317,7 +320,8 @@
317 interrupts = <11>; 320 interrupts = <11>;
318 clocks = <&ahb_gates 21>, <&spi1_clk>; 321 clocks = <&ahb_gates 21>, <&spi1_clk>;
319 clock-names = "ahb", "mod"; 322 clock-names = "ahb", "mod";
320 dmas = <&dma 1 9>, <&dma 1 8>; 323 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
324 <&dma SUN4I_DMA_DEDICATED 8>;
321 dma-names = "rx", "tx"; 325 dma-names = "rx", "tx";
322 status = "disabled"; 326 status = "disabled";
323 #address-cells = <1>; 327 #address-cells = <1>;
@@ -380,7 +384,8 @@
380 interrupts = <12>; 384 interrupts = <12>;
381 clocks = <&ahb_gates 22>, <&spi2_clk>; 385 clocks = <&ahb_gates 22>, <&spi2_clk>;
382 clock-names = "ahb", "mod"; 386 clock-names = "ahb", "mod";
383 dmas = <&dma 1 29>, <&dma 1 28>; 387 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
388 <&dma SUN4I_DMA_DEDICATED 28>;
384 dma-names = "rx", "tx"; 389 dma-names = "rx", "tx";
385 status = "disabled"; 390 status = "disabled";
386 #address-cells = <1>; 391 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 8c0507054757..cd492ac9b200 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -49,6 +49,8 @@
49 49
50#include "skeleton.dtsi" 50#include "skeleton.dtsi"
51 51
52#include <dt-bindings/dma/sun4i-a10.h>
53
52/ { 54/ {
53 interrupt-parent = <&gic>; 55 interrupt-parent = <&gic>;
54 56
@@ -479,7 +481,8 @@
479 interrupts = <0 10 4>; 481 interrupts = <0 10 4>;
480 clocks = <&ahb_gates 20>, <&spi0_clk>; 482 clocks = <&ahb_gates 20>, <&spi0_clk>;
481 clock-names = "ahb", "mod"; 483 clock-names = "ahb", "mod";
482 dmas = <&dma 1 27>, <&dma 1 26>; 484 dmas = <&dma SUN4I_DMA_DEDICATED 27>,
485 <&dma SUN4I_DMA_DEDICATED 26>;
483 dma-names = "rx", "tx"; 486 dma-names = "rx", "tx";
484 status = "disabled"; 487 status = "disabled";
485 #address-cells = <1>; 488 #address-cells = <1>;
@@ -492,7 +495,8 @@
492 interrupts = <0 11 4>; 495 interrupts = <0 11 4>;
493 clocks = <&ahb_gates 21>, <&spi1_clk>; 496 clocks = <&ahb_gates 21>, <&spi1_clk>;
494 clock-names = "ahb", "mod"; 497 clock-names = "ahb", "mod";
495 dmas = <&dma 1 9>, <&dma 1 8>; 498 dmas = <&dma SUN4I_DMA_DEDICATED 9>,
499 <&dma SUN4I_DMA_DEDICATED 8>;
496 dma-names = "rx", "tx"; 500 dma-names = "rx", "tx";
497 status = "disabled"; 501 status = "disabled";
498 #address-cells = <1>; 502 #address-cells = <1>;
@@ -589,7 +593,8 @@
589 interrupts = <0 12 4>; 593 interrupts = <0 12 4>;
590 clocks = <&ahb_gates 22>, <&spi2_clk>; 594 clocks = <&ahb_gates 22>, <&spi2_clk>;
591 clock-names = "ahb", "mod"; 595 clock-names = "ahb", "mod";
592 dmas = <&dma 1 29>, <&dma 1 28>; 596 dmas = <&dma SUN4I_DMA_DEDICATED 29>,
597 <&dma SUN4I_DMA_DEDICATED 28>;
593 dma-names = "rx", "tx"; 598 dma-names = "rx", "tx";
594 status = "disabled"; 599 status = "disabled";
595 #address-cells = <1>; 600 #address-cells = <1>;
@@ -630,7 +635,8 @@
630 interrupts = <0 50 4>; 635 interrupts = <0 50 4>;
631 clocks = <&ahb_gates 23>, <&spi3_clk>; 636 clocks = <&ahb_gates 23>, <&spi3_clk>;
632 clock-names = "ahb", "mod"; 637 clock-names = "ahb", "mod";
633 dmas = <&dma 1 31>, <&dma 1 30>; 638 dmas = <&dma SUN4I_DMA_DEDICATED 31>,
639 <&dma SUN4I_DMA_DEDICATED 30>;
634 dma-names = "rx", "tx"; 640 dma-names = "rx", "tx";
635 status = "disabled"; 641 status = "disabled";
636 #address-cells = <1>; 642 #address-cells = <1>;
diff --git a/include/dt-bindings/dma/sun4i-a10.h b/include/dt-bindings/dma/sun4i-a10.h
new file mode 100644
index 000000000000..8caba9ef7e9d
--- /dev/null
+++ b/include/dt-bindings/dma/sun4i-a10.h
@@ -0,0 +1,56 @@
1/*
2 * Copyright 2014 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this file; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24 * MA 02110-1301 USA
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
48 */
49
50#ifndef __DT_BINDINGS_DMA_SUN4I_A10_H_
51#define __DT_BINDINGS_DMA_SUN4I_A10_H_
52
53#define SUN4I_DMA_NORMAL 0
54#define SUN4I_DMA_DEDICATED 1
55
56#endif /* __DT_BINDINGS_DMA_SUN4I_A10_H_ */