All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429
@ 2016-09-19  1:28 Bruno Herrera
       [not found] ` <CAF3+TqcYuXnzokoR=vAsOofBkyA1WhuXvCc6HrekAovW2VejMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Herrera @ 2016-09-19  1:28 UTC (permalink / raw)
  To: alexandre.torgue-qxv4g6HH51o
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Maxime Coquelin, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	gerald.baeza-qxv4g6HH51o,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, Jiri Slaby,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA

> Signed-off-by: Gerald Baeza <gerald.baeza-qxv4g6HH51o@public.gmane.org>
> Signed-off-by: Alexandre TORGUE <alexandre.torgue-qxv4g6HH51o@public.gmane.org>

I just tested your patch with success in two scenarios:

1) STM32F469IDISCO board
2) Custom board running STM32F439NI

Tested-by: Bruno Herrera <bruherrera-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

One last comment I have bellow:

>
> diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
> index 35df462..227376b 100644
> --- a/arch/arm/boot/dts/stm32f429.dtsi
> +++ b/arch/arm/boot/dts/stm32f429.dtsi
> @@ -161,6 +161,9 @@
>                         interrupts = <37>;
>                         clocks = <&rcc 0 164>;
>                         status = "disabled";
> +                       dmas = <&dma2 2 4 0x414 0x0>,
> +                              <&dma2 7 4 0x414 0x0>;

According to stm32-dma.txt documentation in the third parameter (32bit
mask) only the following bits can be set : 9,10,15,16,17 and 0x414 is
setting bits 2 and 4. It make sense if you look in the register itself
(DMA_SxCR) but as far I could see from the DMA driver code this bits
are set internally. The correct value should be 0x400.

> +                       dma-names = "rx", "tx";
>                 };
>
>                 usart6: serial@40011400 {
--
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	[flat|nested] 5+ messages in thread

* Re: [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429
  2016-09-19  1:28 [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429 Bruno Herrera
@ 2016-09-19  7:47     ` Alexandre Torgue
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Torgue @ 2016-09-19  7:47 UTC (permalink / raw)
  To: Bruno Herrera
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Maxime Coquelin, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	gerald.baeza-qxv4g6HH51o,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, Jiri Slaby,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA

Hi Bruno,

On 09/19/2016 03:28 AM, Bruno Herrera wrote:
>> Signed-off-by: Gerald Baeza <gerald.baeza-qxv4g6HH51o@public.gmane.org>
>> Signed-off-by: Alexandre TORGUE <alexandre.torgue-qxv4g6HH51o@public.gmane.org>
>
> I just tested your patch with success in two scenarios:
>
> 1) STM32F469IDISCO board
> 2) Custom board running STM32F439NI
>
> Tested-by: Bruno Herrera <bruherrera-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> One last comment I have bellow:
>
>>
>> diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
>> index 35df462..227376b 100644
>> --- a/arch/arm/boot/dts/stm32f429.dtsi
>> +++ b/arch/arm/boot/dts/stm32f429.dtsi
>> @@ -161,6 +161,9 @@
>>                         interrupts = <37>;
>>                         clocks = <&rcc 0 164>;
>>                         status = "disabled";
>> +                       dmas = <&dma2 2 4 0x414 0x0>,
>> +                              <&dma2 7 4 0x414 0x0>;
>
> According to stm32-dma.txt documentation in the third parameter (32bit
> mask) only the following bits can be set : 9,10,15,16,17 and 0x414 is
> setting bits 2 and 4. It make sense if you look in the register itself
> (DMA_SxCR) but as far I could see from the DMA driver code this bits
> are set internally. The correct value should be 0x400.

Thanks for you careful review: the dma issue you noticed is due to the 
fact that this bit field binding changed between kernel 4.2 and 4.8. 
Front of kernel 4.2, 0x414 was fine... but now it is no more, you are 
right.
I will fix it in my next pull request.

Thanks
Alex

>
>> +                       dma-names = "rx", "tx";
>>                 };
>>
>>                 usart6: serial@40011400 {
.


--
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	[flat|nested] 5+ messages in thread

* [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429
@ 2016-09-19  7:47     ` Alexandre Torgue
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Torgue @ 2016-09-19  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bruno,

On 09/19/2016 03:28 AM, Bruno Herrera wrote:
>> Signed-off-by: Gerald Baeza <gerald.baeza@st.com>
>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
>
> I just tested your patch with success in two scenarios:
>
> 1) STM32F469IDISCO board
> 2) Custom board running STM32F439NI
>
> Tested-by: Bruno Herrera <bruherrera@gmail.com>
>
> One last comment I have bellow:
>
>>
>> diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
>> index 35df462..227376b 100644
>> --- a/arch/arm/boot/dts/stm32f429.dtsi
>> +++ b/arch/arm/boot/dts/stm32f429.dtsi
>> @@ -161,6 +161,9 @@
>>                         interrupts = <37>;
>>                         clocks = <&rcc 0 164>;
>>                         status = "disabled";
>> +                       dmas = <&dma2 2 4 0x414 0x0>,
>> +                              <&dma2 7 4 0x414 0x0>;
>
> According to stm32-dma.txt documentation in the third parameter (32bit
> mask) only the following bits can be set : 9,10,15,16,17 and 0x414 is
> setting bits 2 and 4. It make sense if you look in the register itself
> (DMA_SxCR) but as far I could see from the DMA driver code this bits
> are set internally. The correct value should be 0x400.

Thanks for you careful review: the dma issue you noticed is due to the 
fact that this bit field binding changed between kernel 4.2 and 4.8. 
Front of kernel 4.2, 0x414 was fine... but now it is no more, you are 
right.
I will fix it in my next pull request.

Thanks
Alex

>
>> +                       dma-names = "rx", "tx";
>>                 };
>>
>>                 usart6: serial at 40011400 {
.

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

* [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429
  2016-09-15 16:42 [PATCH 00/11] STM32 USART: fixes and new MCU support Alexandre TORGUE
@ 2016-09-15 16:42     ` Alexandre TORGUE
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre TORGUE @ 2016-09-15 16:42 UTC (permalink / raw)
  To: Maxime Coquelin, Rob Herring, gerald.baeza-qxv4g6HH51o,
	Greg Kroah-Hartman, Jiri Slaby
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Gerald Baeza <gerald.baeza-qxv4g6HH51o@public.gmane.org>
Signed-off-by: Alexandre TORGUE <alexandre.torgue-qxv4g6HH51o@public.gmane.org>

diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
index 35df462..227376b 100644
--- a/arch/arm/boot/dts/stm32f429.dtsi
+++ b/arch/arm/boot/dts/stm32f429.dtsi
@@ -161,6 +161,9 @@
 			interrupts = <37>;
 			clocks = <&rcc 0 164>;
 			status = "disabled";
+			dmas = <&dma2 2 4 0x414 0x0>,
+			       <&dma2 7 4 0x414 0x0>;
+			dma-names = "rx", "tx";
 		};
 
 		usart6: serial@40011400 {
-- 
1.9.1

--
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] 5+ messages in thread

* [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429
@ 2016-09-15 16:42     ` Alexandre TORGUE
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre TORGUE @ 2016-09-15 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Gerald Baeza <gerald.baeza@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
index 35df462..227376b 100644
--- a/arch/arm/boot/dts/stm32f429.dtsi
+++ b/arch/arm/boot/dts/stm32f429.dtsi
@@ -161,6 +161,9 @@
 			interrupts = <37>;
 			clocks = <&rcc 0 164>;
 			status = "disabled";
+			dmas = <&dma2 2 4 0x414 0x0>,
+			       <&dma2 7 4 0x414 0x0>;
+			dma-names = "rx", "tx";
 		};
 
 		usart6: serial at 40011400 {
-- 
1.9.1

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

end of thread, other threads:[~2016-09-19  7:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19  1:28 [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429 Bruno Herrera
     [not found] ` <CAF3+TqcYuXnzokoR=vAsOofBkyA1WhuXvCc6HrekAovW2VejMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19  7:47   ` Alexandre Torgue
2016-09-19  7:47     ` Alexandre Torgue
  -- strict thread matches above, loose matches on Subject: below --
2016-09-15 16:42 [PATCH 00/11] STM32 USART: fixes and new MCU support Alexandre TORGUE
     [not found] ` <1473957763-30629-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2016-09-15 16:42   ` [PATCH 11/11] ARM: DT: STM32: add dma for usart1 on F429 Alexandre TORGUE
2016-09-15 16:42     ` 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.