All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Erwan LE RAY <erwan.leray@foss.st.com>,
	Alexandre TORGUE <alexandre.torgue@foss.st.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Marek Vasut <marex@denx.de>,
	Marcin Sloniewski <marcin.sloniewski@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH 00/16] STM32 configure UART nodes for DMA
Date: Fri, 4 Feb 2022 16:47:58 +0100	[thread overview]
Message-ID: <4748285a-e554-0f7f-525c-efdea0003ab8@pengutronix.de> (raw)
In-Reply-To: <98823363-710c-6286-8e63-ba8e5dcadeba@foss.st.com>

Hello Erwan,

On 04.02.22 16:41, Erwan LE RAY wrote:
> Hi Ahmad,
> 
> 
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>> Hi Ahmad
>>
>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>> Hello Erwan,
>>>
>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>> remove it at board level to keep current PIO behavior when needed.
>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>> is now configured in DMA mode.
>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>> console has been removed from the driver by commit e359b4411c28
>>>> ("serial: stm32: fix threaded interrupt handling").
>>>
>>> Do I understand correctly that your first patch breaks consoles of
>>> most/all boards, because they will briefly use DMA, which is refused
>>> by the stm32-usart driver and then you add a patch for each board
>>> to fix that breakage?
>>
>> We have two solutions and both have pro/drawbacks. The first one (Erwan ones, can break the boot if the patch is taken "alone". Your proposition avoids this breakage but deletes a non define property (which is a bit weird). However I prefer to keep a functional behavior, and keep Ahmad proposition. Ahmad, just one question, dt-bindings check doesn't complain about it ?
>>
>> Cheers
>> Alex
>>
>>>
>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>> is a no-op when the property doesn't exist, so you could move the first
>>> patch to the very end to avoid intermittent breakage.
>>>
>>> I also think that the driver's behavior is a bit harsh. I think it would
>>> be better for the UART driver to print a warning and fall back to
>>> PIO for console instead of outright refusing and rendering the system
>>> silent. That's not mutually exclusive with your patch series here, of course.
>>>
>>> Cheers,
>>> Ahmad
>>>
> 
> The driver implementation will consider the request to probe the UART console in DMA mode as an error (-ENODEV), and will fallback this UART probe in irq mode.
> Whatever the patch ordering, the boot will never be broken. The board dt patches aim to get a "proper" implementation, but from functional perspective the driver will manage a request to probe an UART console in DMA mode as an error and fall it back in irq mode.

Thanks for the clarification. In that case, your changes look good to me.

Cheers,
Ahmad

> 
> Cheers, Erwan.
> 
>>>>
>>>> For other stm32mp15x-based boards, current configuration is kept for
>>>> all UART instances.
>>>>
>>>> Erwan Le Ray (16):
>>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>>      stm32mp15xx-dhcor-avenger96
>>>>
>>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>>   16 files changed, 71 insertions(+)
>>>>
>>>
>>>
>>
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Erwan LE RAY <erwan.leray@foss.st.com>,
	Alexandre TORGUE <alexandre.torgue@foss.st.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Marek Vasut <marex@denx.de>,
	Marcin Sloniewski <marcin.sloniewski@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH 00/16] STM32 configure UART nodes for DMA
Date: Fri, 4 Feb 2022 16:47:58 +0100	[thread overview]
Message-ID: <4748285a-e554-0f7f-525c-efdea0003ab8@pengutronix.de> (raw)
In-Reply-To: <98823363-710c-6286-8e63-ba8e5dcadeba@foss.st.com>

Hello Erwan,

On 04.02.22 16:41, Erwan LE RAY wrote:
> Hi Ahmad,
> 
> 
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>> Hi Ahmad
>>
>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>> Hello Erwan,
>>>
>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>> remove it at board level to keep current PIO behavior when needed.
>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>> is now configured in DMA mode.
>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>> console has been removed from the driver by commit e359b4411c28
>>>> ("serial: stm32: fix threaded interrupt handling").
>>>
>>> Do I understand correctly that your first patch breaks consoles of
>>> most/all boards, because they will briefly use DMA, which is refused
>>> by the stm32-usart driver and then you add a patch for each board
>>> to fix that breakage?
>>
>> We have two solutions and both have pro/drawbacks. The first one (Erwan ones, can break the boot if the patch is taken "alone". Your proposition avoids this breakage but deletes a non define property (which is a bit weird). However I prefer to keep a functional behavior, and keep Ahmad proposition. Ahmad, just one question, dt-bindings check doesn't complain about it ?
>>
>> Cheers
>> Alex
>>
>>>
>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>> is a no-op when the property doesn't exist, so you could move the first
>>> patch to the very end to avoid intermittent breakage.
>>>
>>> I also think that the driver's behavior is a bit harsh. I think it would
>>> be better for the UART driver to print a warning and fall back to
>>> PIO for console instead of outright refusing and rendering the system
>>> silent. That's not mutually exclusive with your patch series here, of course.
>>>
>>> Cheers,
>>> Ahmad
>>>
> 
> The driver implementation will consider the request to probe the UART console in DMA mode as an error (-ENODEV), and will fallback this UART probe in irq mode.
> Whatever the patch ordering, the boot will never be broken. The board dt patches aim to get a "proper" implementation, but from functional perspective the driver will manage a request to probe an UART console in DMA mode as an error and fall it back in irq mode.

Thanks for the clarification. In that case, your changes look good to me.

Cheers,
Ahmad

> 
> Cheers, Erwan.
> 
>>>>
>>>> For other stm32mp15x-based boards, current configuration is kept for
>>>> all UART instances.
>>>>
>>>> Erwan Le Ray (16):
>>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>>      stm32mp15xx-dhcor-avenger96
>>>>
>>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>>   16 files changed, 71 insertions(+)
>>>>
>>>
>>>
>>
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-02-04 15:48 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 17:10 [PATCH 00/16] STM32 configure UART nodes for DMA Erwan Le Ray
2022-02-03 17:10 ` Erwan Le Ray
2022-02-03 17:10 ` [PATCH 01/16] ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151 Erwan Le Ray
2022-02-03 17:10   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 02/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 03/16] ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 04/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 05/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 06/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 07/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 08/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 09/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-04 15:49   ` Ahmad Fatoum
2022-02-04 15:49     ` Ahmad Fatoum
2022-02-03 17:11 ` [PATCH 11/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 12/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 13/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 14/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 15/16] ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:25   ` Marek Vasut
2022-02-03 17:25     ` Marek Vasut
2022-02-03 17:25 ` [PATCH 00/16] STM32 configure UART nodes for DMA Ahmad Fatoum
2022-02-03 17:25   ` Ahmad Fatoum
2022-02-04 13:22   ` Alexandre TORGUE
2022-02-04 13:22     ` Alexandre TORGUE
2022-02-04 15:41     ` Erwan LE RAY
2022-02-04 15:41       ` Erwan LE RAY
2022-02-04 15:47       ` Ahmad Fatoum [this message]
2022-02-04 15:47         ` Ahmad Fatoum
2022-11-08 11:59       ` Uwe Kleine-König
2022-11-08 11:59         ` Uwe Kleine-König
2022-11-08 15:28         ` Marek Vasut
2022-11-08 15:28           ` Marek Vasut
2022-11-09 13:48           ` [Linux-stm32] " Amelie Delaunay
2022-11-09 13:48             ` Amelie Delaunay
2022-11-21  8:48             ` Valentin CARON
2022-11-21  8:48               ` Valentin CARON
2022-02-14 10:02 ` Alexandre TORGUE
2022-02-14 10:02   ` Alexandre TORGUE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4748285a-e554-0f7f-525c-efdea0003ab8@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=alexandre.torgue@foss.st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=erwan.leray@foss.st.com \
    --cc=jagan@amarulasolutions.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=marcin.sloniewski@gmail.com \
    --cc=marex@denx.de \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.