From: Alexandre TORGUE <alexandre.torgue@st.com>
To: Vladimir Murzin <vladimir.murzin@arm.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
Patrice CHOTARD <patrice.chotard@st.com>,
"lee.jones@linaro.org" <lee.jones@linaro.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 1/3] ARM: dts: stm32: add DMA memory pool on MCU which embed a cortex-M7
Date: Wed, 13 Dec 2017 12:50:15 +0000 [thread overview]
Message-ID: <b34454840b5346b998a80a98dd05287f@SFHDAG3NODE2.st.com> (raw)
In-Reply-To: ab9a2ef4-4944-c935-af6e-12503b477879@arm.com
-----Original Message-----
From: Alexandre TORGUE
Sent: mercredi 13 décembre 2017 11:28
To: 'Vladimir Murzin' <vladimir.murzin@arm.com>; Maxime Coquelin <mcoquelin.stm32@gmail.com>; arnd@arndb.de; robh+dt@kernel.org; mark.rutland@arm.com; linux@armlinux.org.uk; Patrice CHOTARD <patrice.chotard@st.com>; lee.jones@linaro.org
Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH 1/3] ARM: dts: stm32: add DMA memory pool on MCU which embed a cortex-M7
-----Original Message-----
From: Vladimir Murzin [mailto:vladimir.murzin@arm.com]
Sent: mercredi 13 décembre 2017 11:07
To: Alexandre TORGUE <alexandre.torgue@st.com>; Maxime Coquelin <mcoquelin.stm32@gmail.com>; arnd@arndb.de; robh+dt@kernel.org; mark.rutland@arm.com; linux@armlinux.org.uk; Patrice CHOTARD <patrice.chotard@st.com>; lee.jones@linaro.org
Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] ARM: dts: stm32: add DMA memory pool on MCU which embed a cortex-M7
On 12/12/17 18:02, Alexandre Torgue wrote:
> On cortex-M7 MCU, DMA have to use a non cache-able memory area. For
> this reason a dedicated memory pool is created for DMA.
> This patch creates a DMA memory pool of 1MB of each STM32 MCU which
> embeds a cortex-M7 expect stm32f746-disco. Indeed, as stm32f746-disco
> has
^^^^^^
except?
Sorry, Is there a typo issue (or just wording issue) ?
Sorry I was not awake this morning. If no v2 I will fix this typo when I will apply patch on my tree.
> only a 8MB SDRAM and it's tricky to reduce memory used by Kernel.
I guess that 1MB is a kind of "should be enough" estimate, probably something along with [1] would give you exact numbers...
Exactly, 1MB is a kind "should be enough" and code is here to show that we need a dedicated memory area for DMA. But this value has to be adapt regarding to use case needed by users. Thanks for the lkml link. It will help users to adapt DMA area and thanks for reviewing.
Regards
Alex
>
> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
>
> diff --git a/arch/arm/boot/dts/stm32746g-eval.dts
> b/arch/arm/boot/dts/stm32746g-eval.dts
> index 2d4e717..3f52a7b 100644
> --- a/arch/arm/boot/dts/stm32746g-eval.dts
> +++ b/arch/arm/boot/dts/stm32746g-eval.dts
> @@ -57,6 +57,19 @@
> reg = <0xc0000000 0x2000000>;
> };
>
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + linux,dma {
> + compatible = "shared-dma-pool";
> + linux,dma-default;
> + no-map;
> + reg = <0xc1f00000 0x100000>;
> + };
> + };
> +
> aliases {
> serial0 = &usart1;
> };
> diff --git a/arch/arm/boot/dts/stm32f769-disco.dts
> b/arch/arm/boot/dts/stm32f769-disco.dts
> index 4463ca1..08699a2 100644
> --- a/arch/arm/boot/dts/stm32f769-disco.dts
> +++ b/arch/arm/boot/dts/stm32f769-disco.dts
> @@ -57,6 +57,19 @@
> reg = <0xC0000000 0x1000000>;
> };
>
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + linux,dma {
> + compatible = "shared-dma-pool";
> + linux,dma-default;
> + no-map;
> + reg = <0xc0f00000 0x100000>;
> + };
> + };
> +
> aliases {
> serial0 = &usart1;
> };
> diff --git a/arch/arm/boot/dts/stm32h743i-disco.dts
> b/arch/arm/boot/dts/stm32h743i-disco.dts
> index 79e841d..104545a 100644
> --- a/arch/arm/boot/dts/stm32h743i-disco.dts
> +++ b/arch/arm/boot/dts/stm32h743i-disco.dts
> @@ -57,6 +57,19 @@
> reg = <0xd0000000 0x2000000>;
> };
>
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + linux,dma {
> + compatible = "shared-dma-pool";
> + linux,dma-default;
> + no-map;
> + reg = <0xc1f00000 0x100000>;
> + };
> + };
> +
> aliases {
> serial0 = &usart2;
> };
> diff --git a/arch/arm/boot/dts/stm32h743i-eval.dts
> b/arch/arm/boot/dts/stm32h743i-eval.dts
> index 9f0e72c..5bd4b16 100644
> --- a/arch/arm/boot/dts/stm32h743i-eval.dts
> +++ b/arch/arm/boot/dts/stm32h743i-eval.dts
> @@ -57,6 +57,19 @@
> reg = <0xd0000000 0x2000000>;
> };
>
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + linux,dma {
> + compatible = "shared-dma-pool";
> + linux,dma-default;
> + no-map;
> + reg = <0xc1f00000 0x100000>;
> + };
> + };
> +
> aliases {
> serial0 = &usart1;
> };
>
Usage of dma-default looks correct to me, so FWIW
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
[1] https://lkml.org/lkml/2017/7/7/296
Vladimir
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2017-12-13 12:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 18:02 [PATCH 0/3] Enable DMA on STM32 MCU based on cortex-M7 Alexandre Torgue
[not found] ` <1513101746-18030-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-12-12 18:02 ` [PATCH 1/3] ARM: dts: stm32: add DMA memory pool on MCU which embed a cortex-M7 Alexandre Torgue
[not found] ` <1513101746-18030-2-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-12-13 10:06 ` Vladimir Murzin
[not found] ` <ab9a2ef4-4944-c935-af6e-12503b477879-5wv7dgnIgG8@public.gmane.org>
2017-12-13 10:28 ` Alexandre TORGUE
2017-12-13 12:50 ` Alexandre TORGUE [this message]
2017-12-12 18:02 ` [PATCH 2/3] ARM: configs: stm32: Enable ARM_MPU Alexandre Torgue
[not found] ` <1513101746-18030-3-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-12-13 10:11 ` Vladimir Murzin
2018-02-27 17:11 ` Alexandre Torgue
2017-12-12 18:02 ` [PATCH 3/3] ARM: dts: stm32: enable dma on MCU which embed a cortex-M7 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=b34454840b5346b998a80a98dd05287f@SFHDAG3NODE2.st.com \
--to=alexandre.torgue@st.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=patrice.chotard@st.com \
--cc=robh+dt@kernel.org \
--cc=vladimir.murzin@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox