linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dillon.minfei@gmail.com
To: robh+dt@kernel.org, mcoquelin.stm32@gmail.com,
	alexandre.torgue@st.com, linux@armlinux.org.uk,
	vladimir.murzin@arm.com, kstewart@linuxfoundation.org,
	allison@lohutok.net, info@metux.net, tglx@linutronix.de
Cc: devicetree@vger.kernel.org, dillon min <dillon.minfei@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ARM: dts: stm32: Setup 4M bytes reserved memory for mmap
Date: Mon,  8 Jun 2020 16:30:37 +0800	[thread overview]
Message-ID: <1591605038-8682-2-git-send-email-dillon.minfei@gmail.com> (raw)
In-Reply-To: <1591605038-8682-1-git-send-email-dillon.minfei@gmail.com>

From: dillon min <dillon.minfei@gmail.com>

To mmap a framebuffer or v4l2 buffer from kernel to userspace on
no-mmu platform, we need rely on 'arm_nommu_dma_ops' from
arch/arm/mm/dma-mapping-nommu.c , so setup 4M bytes memory
reserved for this purpose.

Signed-off-by: dillon min <dillon.minfei@gmail.com>
---
 arch/arm/boot/dts/stm32f469-disco.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
index 9397db0c43de..082b24ee81f7 100644
--- a/arch/arm/boot/dts/stm32f469-disco.dts
+++ b/arch/arm/boot/dts/stm32f469-disco.dts
@@ -65,6 +65,20 @@
 		reg = <0x00000000 0x1000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		linux,dma {
+			compatible = "shared-dma-pool";
+			size = <0x400000>;
+			no-map;
+			linux,dma-default;
+		};
+
+	};
+
 	aliases {
 		serial0 = &usart3;
 	};
-- 
2.7.4


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

  reply	other threads:[~2020-06-08  8:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  8:30 [PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region dillon.minfei
2020-06-08  8:30 ` dillon.minfei [this message]
2020-06-09 15:58   ` [PATCH 1/2] ARM: dts: stm32: Setup 4M bytes reserved memory for mmap dillon min
2020-06-08  8:30 ` [PATCH 2/2] arm-nommu: Add use_reserved_mem() to check if device support reserved memory dillon.minfei
2020-06-09 14:08   ` Vladimir Murzin
2020-06-09 15:22     ` dillon min
2020-06-09 15:36       ` Christoph Hellwig
2020-06-09 15:43         ` Vladimir Murzin
2020-06-09 16:25           ` Vladimir Murzin
2020-06-09 17:34             ` Christoph Hellwig
2020-06-10  2:24               ` dillon min
2020-06-10  7:24     ` Christoph Hellwig
2020-06-10  8:19       ` Vladimir Murzin
2020-06-11 15:45         ` Vladimir Murzin
2020-06-12  2:15           ` dillon min
2020-06-09 15:58 ` [PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region dillon min

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=1591605038-8682-2-git-send-email-dillon.minfei@gmail.com \
    --to=dillon.minfei@gmail.com \
    --cc=alexandre.torgue@st.com \
    --cc=allison@lohutok.net \
    --cc=devicetree@vger.kernel.org \
    --cc=info@metux.net \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).