Thread (32 messages) flat view 32 messages, 4 authors, 2011-02-14
STALE5653d

[PATCH 3/5] ARM: mxs: dynamically allocate dma device for mx23/28

From: Shawn Guo <hidden>
Date: 2011-02-09 00:22:12

On Mon, Feb 07, 2011 at 09:09:45AM +0100, Sascha Hauer wrote:
On Sat, Feb 05, 2011 at 10:08:14AM +0800, Shawn Guo wrote:
quoted
Signed-off-by: Shawn Guo <redacted>
---
 arch/arm/mach-mxs/clock-mx23.c                  |    3 +-
 arch/arm/mach-mxs/clock-mx28.c                  |    4 +-
 arch/arm/mach-mxs/devices-mx23.h                |    6 +++
 arch/arm/mach-mxs/devices-mx28.h                |    6 +++
 arch/arm/mach-mxs/devices/Kconfig               |    3 +
 arch/arm/mach-mxs/devices/Makefile              |    1 +
 arch/arm/mach-mxs/devices/platform-dma.c        |   50 +++++++++++++++++++++++
 arch/arm/mach-mxs/include/mach/devices-common.h |    7 +++
 8 files changed, 77 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/mach-mxs/devices/platform-dma.c
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h
index 1256788..d5595ce 100644
--- a/arch/arm/mach-mxs/devices-mx23.h
+++ b/arch/arm/mach-mxs/devices-mx23.h
@@ -14,3 +14,9 @@
 extern const struct amba_device mx23_duart_device __initconst;
 #define mx23_add_duart() \
 	mxs_add_duart(&mx23_duart_device)
+
+extern const struct mxs_dma_data mx23_dma_data[] __initconst;
+#define mx23_add_apbh_dma() \
+	mxs_add_dma(&mx23_dma_data[0])
+#define mx23_add_apbx_dma() \
+	mxs_add_dma(&mx23_dma_data[1])
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
index 3b18304..e3a3bbc 100644
--- a/arch/arm/mach-mxs/devices-mx28.h
+++ b/arch/arm/mach-mxs/devices-mx28.h
@@ -23,6 +23,12 @@ extern const struct mxs_auart_data mx28_auart_data[] __initconst;
 #define mx28_add_auart3()		mx28_add_auart(3)
 #define mx28_add_auart4()		mx28_add_auart(4)
 
+extern const struct mxs_dma_data mx28_dma_data[] __initconst;
+#define mx28_add_apbh_dma() \
+	mxs_add_dma(&mx28_dma_data[0])
+#define mx28_add_apbx_dma() \
+	mxs_add_dma(&mx28_dma_data[1])
+
Given that the DMA device is fully internal to the SoC and always
present, does it make sense to add it dynamically and to leave
registration to the boards?
OK.  Will make it in initcall.  Correct me if this is not what you
expect.

Regards,
Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help