All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] ARM: DT: stm32: move dma translation to board files
@ 2016-10-25 21:06 Bruno Herrera
       [not found] ` <CAF3+Tqd2MGmz+8XhLXhaZiEc78QOwHSpVrQA65-p1AcfT+_xgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 32+ messages in thread
From: Bruno Herrera @ 2016-10-25 21:06 UTC (permalink / raw)
  To: alexandre.torgue-qxv4g6HH51o
  Cc: Maxime Coquelin, arnd-r2nGTMty4D4, >,
	mark.rutland-5wv7dgnIgG8, linux-I+IVW8TIWO2tmTQ+vhA3Yw, >,
	lee.jones-QSEj5FYQhm4dnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Alexandre,

>
> stm32f469-disco and stm32f429-eval boards use SDRAM start address remapping
> (to @0) to boost performances. A DMA translation through "dma-ranges"
> property was needed for other masters than the M4 CPU.
> stm32f429-disco doesn't use remapping so doesn't need this DMA translation.
> This patches moves this DMA translation definition from stm32f429 soc file
> to board files.
>
> Signed-off-by: Alexandre TORGUE <alexandre.torgue-qxv4g6HH51o@public.gmane.org>
>
> diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts
> index 13c7cd2..a763c15 100644
> --- a/arch/arm/boot/dts/stm32429i-eval.dts
> +++ b/arch/arm/boot/dts/stm32429i-eval.dts
> @@ -82,6 +82,10 @@
>                 };
>         };
>
> +       soc {
> +               dma-ranges = <0xc0000000 0x0 0x10000000>;
> +       };
> +
>         usbotg_hs_phy: usbphy {
>                 #phy-cells = <0>;
>                 compatible = "usb-nop-xceiv";

Shouldn't also the peripheral dma-ranges property move to board specific too?
I  had this patch for while but I didn't had the time to submit:

Author: Bruno Herrera <bruherrera-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date:   Sun Oct 16 14:50:00 2016 -0200

    ARM: DT: STM32: Use dma-ranges property per board not at dtsi file

diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
index 6bfc595..2a22a82 100644
--- a/arch/arm/boot/dts/stm32429i-eval.dts
+++ b/arch/arm/boot/dts/stm32429i-eval.dts
@@ -52,6 +52,10 @@
        model = "STMicroelectronics STM32429i-EVAL board";
        compatible = "st,stm32429i-eval", "st,stm32f429";

+       soc {
+               dma-ranges = <0xC0000000 0x0 0x10000000>;
+       };
+
        chosen {
                bootargs = "root=/dev/ram rdinit=/linuxrc";
                stdout-path = "serial0:115200n8";
@@ -96,6 +100,7 @@

 &ethernet0 {
        status = "okay";
+       dma-ranges;
        pinctrl-0       = <&ethernet0_mii>;
        pinctrl-names   = "default";
        phy-mode        = "mii-id";
@@ -116,6 +121,7 @@
 };

 &usbotg_hs {
+       dma-ranges;
        dr_mode = "host";
        phys = <&usbotg_hs_phy>;
        phy-names = "usb2-phy";
diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
index 7d624a2..697a133 100644
--- a/arch/arm/boot/dts/stm32f429.dtsi
+++ b/arch/arm/boot/dts/stm32f429.dtsi
@@ -59,7 +59,6 @@
        };

        soc {
-               dma-ranges = <0xc0000000 0x0 0x10000000>;

                timer2: timer@40000000 {
                        compatible = "st,stm32-timer";
@@ -472,13 +471,11 @@
                        st,syscon = <&syscfg 0x4>;
                        snps,pbl = <8>;
                        snps,mixed-burst;
-                       dma-ranges;
                        status = "disabled";
                };

                usbotg_hs: usb@40040000 {
                        compatible = "snps,dwc2";
-                       dma-ranges;
                        reg = <0x40040000 0x40000>;
                        interrupts = <77>;
                        clocks = <&rcc 0 29>;


> diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
> index 0596d60..3a1cfdd 100644
> --- a/arch/arm/boot/dts/stm32f429.dtsi
> +++ b/arch/arm/boot/dts/stm32f429.dtsi
> @@ -59,8 +59,6 @@
>         };
>
>         soc {
> -               dma-ranges = <0xc0000000 0x0 0x10000000>;
> -
>                 timer2: timer@40000000 {
>                         compatible = "st,stm32-timer";
>                         reg = <0x40000000 0x400>;
> diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
> index 9e73656..c2213c0 100644
> --- a/arch/arm/boot/dts/stm32f469-disco.dts
> +++ b/arch/arm/boot/dts/stm32f469-disco.dts
> @@ -64,6 +64,10 @@
>         aliases {
>                 serial0 = &usart3;
>         };
> +
> +       soc {
> +               dma-ranges = <0xc0000000 0x0 0x10000000>;
> +       };
>  };
>
>  &clk_hse {
> --


Br.,
Bruno
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 32+ messages in thread
* [PATCH] ARM: DT: stm32: move dma translation to board files
@ 2016-10-25 16:16 ` Alexandre TORGUE
  0 siblings, 0 replies; 32+ messages in thread
From: Alexandre TORGUE @ 2016-10-25 16:16 UTC (permalink / raw)
  To: Maxime Coquelin, arnd, robh+dt, mark.rutland, linux,
	peter.griffin, lee.jones
  Cc: devicetree, linux-arm-kernel

stm32f469-disco and stm32f429-eval boards use SDRAM start address remapping
(to @0) to boost performances. A DMA translation through "dma-ranges"
property was needed for other masters than the M4 CPU.
stm32f429-disco doesn't use remapping so doesn't need this DMA translation.
This patches moves this DMA translation definition from stm32f429 soc file
to board files.

Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts
index 13c7cd2..a763c15 100644
--- a/arch/arm/boot/dts/stm32429i-eval.dts
+++ b/arch/arm/boot/dts/stm32429i-eval.dts
@@ -82,6 +82,10 @@
 		};
 	};
 
+	soc {
+		dma-ranges = <0xc0000000 0x0 0x10000000>;
+	};
+
 	usbotg_hs_phy: usbphy {
 		#phy-cells = <0>;
 		compatible = "usb-nop-xceiv";
diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
index 0596d60..3a1cfdd 100644
--- a/arch/arm/boot/dts/stm32f429.dtsi
+++ b/arch/arm/boot/dts/stm32f429.dtsi
@@ -59,8 +59,6 @@
 	};
 
 	soc {
-		dma-ranges = <0xc0000000 0x0 0x10000000>;
-
 		timer2: timer@40000000 {
 			compatible = "st,stm32-timer";
 			reg = <0x40000000 0x400>;
diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
index 9e73656..c2213c0 100644
--- a/arch/arm/boot/dts/stm32f469-disco.dts
+++ b/arch/arm/boot/dts/stm32f469-disco.dts
@@ -64,6 +64,10 @@
 	aliases {
 		serial0 = &usart3;
 	};
+
+	soc {
+		dma-ranges = <0xc0000000 0x0 0x10000000>;
+	};
 };
 
 &clk_hse {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-11-03  8:40 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 21:06 [PATCH] ARM: DT: stm32: move dma translation to board files Bruno Herrera
     [not found] ` <CAF3+Tqd2MGmz+8XhLXhaZiEc78QOwHSpVrQA65-p1AcfT+_xgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-26  9:09   ` Alexandre Torgue
2016-10-26  9:09     ` Alexandre Torgue
2016-10-27 10:43     ` Bruno Herrera
2016-10-27 10:43       ` Bruno Herrera
2016-10-27 12:21       ` Alexandre Torgue
2016-10-27 12:21         ` Alexandre Torgue
2016-10-27 12:57         ` Bruno Herrera
2016-10-27 12:57           ` Bruno Herrera
2016-10-28  7:09           ` Radosław Pietrzyk
     [not found]             ` <CAFvLkMQGVygLb9SQ8o+2Q=bg7vvRjpHypmSyjRyLkdcHypoFHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-31 10:27               ` Bruno Herrera
2016-10-31 10:27                 ` Bruno Herrera
2016-10-31 14:14                 ` Radosław Pietrzyk
     [not found]                   ` <CAFvLkMQ6YMg4sf2Ug8x4-YshwnjbLz3aVzm+JpKP6zG9r-WU4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-31 16:41                     ` Bruno Herrera
2016-10-31 16:41                       ` Bruno Herrera
2016-10-31 18:58                       ` Radosław Pietrzyk
     [not found]                         ` <CAFvLkMTCkRcwbRc8GVNBoJFAvKWHYDjOPabueQPjTseZrucadA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-02 14:32                           ` Alexandre Torgue
2016-11-02 14:32                             ` Alexandre Torgue
     [not found]                             ` <3e854414-f51d-3e59-6cee-142106cef40f-qxv4g6HH51o@public.gmane.org>
2016-11-02 16:07                               ` Bruno Herrera
2016-11-02 16:07                                 ` Bruno Herrera
     [not found]                                 ` <CAF3+TqeiPjtG7Fs1-cpbcHGxxtSS1UOGD=S=sggpaZahFLJhEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-02 16:14                                   ` Alexandre Torgue
2016-11-02 16:14                                     ` Alexandre Torgue
     [not found]                                     ` <edf05ad5-924d-87d8-fd8d-57e8e0a72052-qxv4g6HH51o@public.gmane.org>
2016-11-02 18:24                                       ` Bruno Herrera
2016-11-02 18:24                                         ` Bruno Herrera
2016-11-02 18:05                                 ` Radosław Pietrzyk
     [not found]                                   ` <CAFvLkMSViXggGr0Set0qnQan_+bXUNzJx5WtZHP-Jyje=ZzDVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-02 18:23                                     ` Bruno Herrera
2016-11-02 18:23                                       ` Bruno Herrera
2016-11-03  7:43                                       ` Radosław Pietrzyk
2016-11-03  8:40                                       ` Alexandre Torgue
2016-11-03  8:40                                         ` Alexandre Torgue
  -- strict thread matches above, loose matches on Subject: below --
2016-10-25 16:16 Alexandre TORGUE
2016-10-25 16:16 ` Alexandre TORGUE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.