Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+92 -14
+10 -4
arch/arm/boot/dts/sun4i-a10.dtsi
··· 12 12 13 13 #include "skeleton.dtsi" 14 14 15 + #include <dt-bindings/dma/sun4i-a10.h> 16 + 15 17 / { 16 18 interrupt-parent = <&intc>; 17 19 ··· 369 367 interrupts = <10>; 370 368 clocks = <&ahb_gates 20>, <&spi0_clk>; 371 369 clock-names = "ahb", "mod"; 372 - dmas = <&dma 1 27>, <&dma 1 26>; 370 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 371 + <&dma SUN4I_DMA_DEDICATED 26>; 373 372 dma-names = "rx", "tx"; 374 373 status = "disabled"; 375 374 #address-cells = <1>; ··· 383 380 interrupts = <11>; 384 381 clocks = <&ahb_gates 21>, <&spi1_clk>; 385 382 clock-names = "ahb", "mod"; 386 - dmas = <&dma 1 9>, <&dma 1 8>; 383 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 384 + <&dma SUN4I_DMA_DEDICATED 8>; 387 385 dma-names = "rx", "tx"; 388 386 status = "disabled"; 389 387 #address-cells = <1>; ··· 481 477 interrupts = <12>; 482 478 clocks = <&ahb_gates 22>, <&spi2_clk>; 483 479 clock-names = "ahb", "mod"; 484 - dmas = <&dma 1 29>, <&dma 1 28>; 480 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 481 + <&dma SUN4I_DMA_DEDICATED 28>; 485 482 dma-names = "rx", "tx"; 486 483 status = "disabled"; 487 484 #address-cells = <1>; ··· 523 518 interrupts = <50>; 524 519 clocks = <&ahb_gates 23>, <&spi3_clk>; 525 520 clock-names = "ahb", "mod"; 526 - dmas = <&dma 1 31>, <&dma 1 30>; 521 + dmas = <&dma SUN4I_DMA_DEDICATED 31>, 522 + <&dma SUN4I_DMA_DEDICATED 30>; 527 523 dma-names = "rx", "tx"; 528 524 status = "disabled"; 529 525 #address-cells = <1>;
+8 -3
arch/arm/boot/dts/sun5i-a10s.dtsi
··· 13 13 14 14 #include "skeleton.dtsi" 15 15 16 + #include <dt-bindings/dma/sun4i-a10.h> 17 + 16 18 / { 17 19 interrupt-parent = <&intc>; 18 20 ··· 322 320 interrupts = <10>; 323 321 clocks = <&ahb_gates 20>, <&spi0_clk>; 324 322 clock-names = "ahb", "mod"; 325 - dmas = <&dma 1 27>, <&dma 1 26>; 323 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 324 + <&dma SUN4I_DMA_DEDICATED 26>; 326 325 dma-names = "rx", "tx"; 327 326 status = "disabled"; 328 327 #address-cells = <1>; ··· 336 333 interrupts = <11>; 337 334 clocks = <&ahb_gates 21>, <&spi1_clk>; 338 335 clock-names = "ahb", "mod"; 339 - dmas = <&dma 1 9>, <&dma 1 8>; 336 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 337 + <&dma SUN4I_DMA_DEDICATED 8>; 340 338 dma-names = "rx", "tx"; 341 339 status = "disabled"; 342 340 #address-cells = <1>; ··· 425 421 interrupts = <12>; 426 422 clocks = <&ahb_gates 22>, <&spi2_clk>; 427 423 clock-names = "ahb", "mod"; 428 - dmas = <&dma 1 29>, <&dma 1 28>; 424 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 425 + <&dma SUN4I_DMA_DEDICATED 28>; 429 426 dma-names = "rx", "tx"; 430 427 status = "disabled"; 431 428 #address-cells = <1>;
+8 -3
arch/arm/boot/dts/sun5i-a13.dtsi
··· 13 13 14 14 #include "skeleton.dtsi" 15 15 16 + #include <dt-bindings/dma/sun4i-a10.h> 17 + 16 18 / { 17 19 interrupt-parent = <&intc>; 18 20 ··· 306 304 interrupts = <10>; 307 305 clocks = <&ahb_gates 20>, <&spi0_clk>; 308 306 clock-names = "ahb", "mod"; 309 - dmas = <&dma 1 27>, <&dma 1 26>; 307 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 308 + <&dma SUN4I_DMA_DEDICATED 26>; 310 309 dma-names = "rx", "tx"; 311 310 status = "disabled"; 312 311 #address-cells = <1>; ··· 320 317 interrupts = <11>; 321 318 clocks = <&ahb_gates 21>, <&spi1_clk>; 322 319 clock-names = "ahb", "mod"; 323 - dmas = <&dma 1 9>, <&dma 1 8>; 320 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 321 + <&dma SUN4I_DMA_DEDICATED 8>; 324 322 dma-names = "rx", "tx"; 325 323 status = "disabled"; 326 324 #address-cells = <1>; ··· 384 380 interrupts = <12>; 385 381 clocks = <&ahb_gates 22>, <&spi2_clk>; 386 382 clock-names = "ahb", "mod"; 387 - dmas = <&dma 1 29>, <&dma 1 28>; 383 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 384 + <&dma SUN4I_DMA_DEDICATED 28>; 388 385 dma-names = "rx", "tx"; 389 386 status = "disabled"; 390 387 #address-cells = <1>;
+10 -4
arch/arm/boot/dts/sun7i-a20.dtsi
··· 49 49 50 50 #include "skeleton.dtsi" 51 51 52 + #include <dt-bindings/dma/sun4i-a10.h> 53 + 52 54 / { 53 55 interrupt-parent = <&gic>; 54 56 ··· 481 479 interrupts = <0 10 4>; 482 480 clocks = <&ahb_gates 20>, <&spi0_clk>; 483 481 clock-names = "ahb", "mod"; 484 - dmas = <&dma 1 27>, <&dma 1 26>; 482 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 483 + <&dma SUN4I_DMA_DEDICATED 26>; 485 484 dma-names = "rx", "tx"; 486 485 status = "disabled"; 487 486 #address-cells = <1>; ··· 495 492 interrupts = <0 11 4>; 496 493 clocks = <&ahb_gates 21>, <&spi1_clk>; 497 494 clock-names = "ahb", "mod"; 498 - dmas = <&dma 1 9>, <&dma 1 8>; 495 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 496 + <&dma SUN4I_DMA_DEDICATED 8>; 499 497 dma-names = "rx", "tx"; 500 498 status = "disabled"; 501 499 #address-cells = <1>; ··· 593 589 interrupts = <0 12 4>; 594 590 clocks = <&ahb_gates 22>, <&spi2_clk>; 595 591 clock-names = "ahb", "mod"; 596 - dmas = <&dma 1 29>, <&dma 1 28>; 592 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 593 + <&dma SUN4I_DMA_DEDICATED 28>; 597 594 dma-names = "rx", "tx"; 598 595 status = "disabled"; 599 596 #address-cells = <1>; ··· 635 630 interrupts = <0 50 4>; 636 631 clocks = <&ahb_gates 23>, <&spi3_clk>; 637 632 clock-names = "ahb", "mod"; 638 - dmas = <&dma 1 31>, <&dma 1 30>; 633 + dmas = <&dma SUN4I_DMA_DEDICATED 31>, 634 + <&dma SUN4I_DMA_DEDICATED 30>; 639 635 dma-names = "rx", "tx"; 640 636 status = "disabled"; 641 637 #address-cells = <1>;
+56
include/dt-bindings/dma/sun4i-a10.h
··· 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_ */