linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 19/20] ARM: mmp: register static mmp_pdma device
Date: Wed,  7 Aug 2013 17:34:08 +0200	[thread overview]
Message-ID: <1375889649-14638-20-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1375889649-14638-1-git-send-email-zonque@gmail.com>

Drop the init call to the properietary dma subsystem and register
the mmp_pdma device.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 arch/arm/mach-mmp/mmp2.c   | 11 +++++++++--
 arch/arm/mach-mmp/pxa168.c | 11 +++++++++--
 arch/arm/mach-mmp/pxa910.c | 11 +++++++++--
 3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index c7592f1..b027c83 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/mmp_dma.h>
 
 #include <asm/hardware/cache-tauros2.h>
 
@@ -22,7 +23,6 @@
 #include <mach/regs-apbc.h>
 #include <mach/cputype.h>
 #include <mach/irqs.h>
-#include <mach/dma.h>
 #include <mach/mfp.h>
 #include <mach/devices.h>
 #include <mach/mmp2.h>
@@ -96,6 +96,12 @@ void __init mmp2_init_irq(void)
 	mmp2_init_icu();
 }
 
+static struct mmp_dma_platdata mmp2_dma_data __initdata = {
+	.dma_channels   = 16,
+};
+
+MMP2_DEVICE(dma, "mmp-pdma", 0, DMA_RIQ, 0x40000000, 0x2000);
+
 static int __init mmp2_init(void)
 {
 	if (cpu_is_mmp2()) {
@@ -104,7 +110,8 @@ static int __init mmp2_init(void)
 #endif
 		mfp_init_base(MFPR_VIRT_BASE);
 		mfp_init_addr(mmp2_addr_map);
-		pxa_init_dma(IRQ_MMP2_DMA_RIQ, 16);
+		pxa_register_device(&mmp2_device_dma, &mmp2_dma_data,
+				    sizeof(mmp2_dma_data));
 		mmp2_clk_init();
 	}
 
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 144e997..0573697 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -15,6 +15,7 @@
 #include <linux/clk.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/mv_usb.h>
+#include <linux/platform_data/mmp_dma.h>
 
 #include <asm/mach/time.h>
 #include <asm/system_misc.h>
@@ -23,7 +24,6 @@
 #include <mach/regs-apbc.h>
 #include <mach/regs-apmu.h>
 #include <mach/irqs.h>
-#include <mach/dma.h>
 #include <mach/devices.h>
 #include <mach/mfp.h>
 #include <linux/dma-mapping.h>
@@ -50,12 +50,19 @@ void __init pxa168_init_irq(void)
 	icu_init_irq();
 }
 
+static struct mmp_dma_platdata pxa168_dma_data __initdata = {
+	.dma_channels   = 32,
+};
+
+PXA168_DEVICE(dma, "mmp-pdma", 0, DMA_INT0, 0x40000000, 0x2000);
+
 static int __init pxa168_init(void)
 {
 	if (cpu_is_pxa168()) {
 		mfp_init_base(MFPR_VIRT_BASE);
 		mfp_init_addr(pxa168_mfp_addr_map);
-		pxa_init_dma(IRQ_PXA168_DMA_INT0, 32);
+		pxa_register_device(&pxa168_device_dma, &pxa168_dma_data,
+				    sizeof(pxa168_dma_data));
 		pxa168_clk_init();
 	}
 
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
index ce6393a..69b112f 100644
--- a/arch/arm/mach-mmp/pxa910.c
+++ b/arch/arm/mach-mmp/pxa910.c
@@ -13,6 +13,7 @@
 #include <linux/list.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/mmp_dma.h>
 
 #include <asm/hardware/cache-tauros2.h>
 #include <asm/mach/time.h>
@@ -20,7 +21,6 @@
 #include <mach/regs-apbc.h>
 #include <mach/cputype.h>
 #include <mach/irqs.h>
-#include <mach/dma.h>
 #include <mach/mfp.h>
 #include <mach/devices.h>
 
@@ -81,6 +81,12 @@ void __init pxa910_init_irq(void)
 	icu_init_irq();
 }
 
+static struct mmp_dma_platdata pxa910_dma_data __initdata = {
+	.dma_channels   = 32,
+};
+
+PXA910_DEVICE(dma, "mmp-pdma", 0, DMA_INT0, 0x40000000, 0x2000);
+
 static int __init pxa910_init(void)
 {
 	if (cpu_is_pxa910()) {
@@ -89,7 +95,8 @@ static int __init pxa910_init(void)
 #endif
 		mfp_init_base(MFPR_VIRT_BASE);
 		mfp_init_addr(pxa910_mfp_addr_map);
-		pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
+		pxa_register_device(&pxa910_device_dma, &pxa910_dma_data,
+				    sizeof(pxa910_dma_data));
 		pxa910_clk_init();
 	}
 
-- 
1.8.3.1

  parent reply	other threads:[~2013-08-07 15:34 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 15:33 [PATCH 00/20] ARM: pxa: move core and drivers to dmaengine Daniel Mack
2013-08-07 15:33 ` [PATCH 01/20] mtd: pxa3xx-nand: replace pxa_request_dma with dmaengine Daniel Mack
2013-08-07 17:46   ` Ezequiel Garcia
2013-08-08  6:42     ` Daniel Mack
2013-08-08 10:12       ` Ezequiel Garcia
2013-08-08 10:14         ` Daniel Mack
2013-08-07 15:33 ` [PATCH 02/20] mtd: pxa3xx-nand: use mmp_pdma_filter_fn and dma_request_slave_channel_compat Daniel Mack
2013-08-07 15:33 ` [PATCH 03/20] ARM: pxa: ssp: add shortcut for &pdev->dev Daniel Mack
2013-08-08  7:32   ` Brian Norris
2013-08-08  7:52     ` Artem Bityutskiy
2013-08-08  8:20       ` Daniel Mack
2013-08-07 15:33 ` [PATCH 04/20] ARM: pxa: ssp: add DT bindings Daniel Mack
2013-08-07 15:54   ` Arnd Bergmann
2013-08-07 15:33 ` [PATCH 05/20] ARM: pxa: ssp: use devm_ functions Daniel Mack
2013-08-07 15:33 ` [PATCH 06/20] tty: serial: pxa: remove old cruft Daniel Mack
2013-08-12  8:19   ` Daniel Mack
2013-08-12 18:08     ` Greg KH
2013-08-07 15:33 ` [PATCH 07/20] spi: spi-pxa2xx: remove legacy PXA DMA bits Daniel Mack
2013-08-07 15:55   ` Mark Brown
2013-08-07 15:59     ` Daniel Mack
2013-08-07 16:41       ` Mark Brown
2013-08-07 15:33 ` [PATCH 08/20] mmc: host: pxamci: switch over to dmaengine use Daniel Mack
2014-10-15 18:32   ` Vasily Khoruzhick
2014-10-16 17:57     ` Vasily Khoruzhick
2013-08-07 15:33 ` [PATCH 09/20] ata: pdata_pxa: migrate over to dmaengine usage Daniel Mack
2013-08-07 15:59   ` Arnd Bergmann
2013-08-07 15:33 ` [PATCH 10/20] net: irda: pxaficp_ir: switch to dmaengine Daniel Mack
2013-08-07 15:34 ` [PATCH 11/20] net: smc91x.c: switch to generic buf-to-buf DMA offload Daniel Mack
2013-08-07 15:34 ` [PATCH 12/20] net: smc911x.c: switch to dmaengine API Daniel Mack
2013-08-07 15:34 ` [PATCH 13/20] ASoC: pxa: pxa-ssp: add DT bindings Daniel Mack
2013-08-07 16:40   ` Mark Brown
2013-08-08  9:39     ` Daniel Mack
2013-08-08 13:20       ` Mark Brown
2013-08-09 13:03         ` Daniel Mack
2013-08-07 15:34 ` [PATCH 14/20] ASoC: pxa: use snd_dmaengine_dai_dma_data Daniel Mack
2013-08-07 15:57   ` Mark Brown
2013-08-07 15:34 ` [PATCH 15/20] ASoC: pxa: pxa-ssp: set dma filter data from startup hook Daniel Mack
2013-08-07 15:58   ` Mark Brown
2013-08-07 15:34 ` [PATCH 16/20] ASoC: pxa: add DT bindings for pxa2xx-pcm Daniel Mack
2013-08-07 16:06   ` Mark Brown
2013-08-07 15:34 ` [PATCH 17/20] ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm Daniel Mack
2013-08-07 16:07   ` Mark Brown
2013-08-07 16:10     ` Daniel Mack
2013-08-07 16:32       ` Mark Brown
2013-08-08  8:18         ` Daniel Mack
2013-08-08  8:44           ` Lars-Peter Clausen
2013-08-08  9:03             ` Daniel Mack
2013-08-08  9:36               ` Mark Brown
2013-08-08  9:43                 ` Daniel Mack
2013-08-08 10:35                   ` Mark Brown
2013-08-08 10:39                     ` Daniel Mack
2013-08-08 11:03                       ` Mark Brown
2013-08-08 10:25                 ` Russell King - ARM Linux
2013-08-07 15:34 ` [PATCH 18/20] ARM: pxa: register static mmp_pdma device Daniel Mack
2013-08-07 15:34 ` Daniel Mack [this message]
2013-08-07 15:34 ` [PATCH 20/20] ARM: pxa: remove old DMA implementation Daniel Mack
2013-08-07 16:08 ` [PATCH 00/20] ARM: pxa: move core and drivers to dmaengine Arnd Bergmann
2013-08-09 22:50 ` Robert Jarzmik
2013-08-10 10:56   ` Daniel Mack
2013-08-11 20:05     ` Robert Jarzmik
2013-08-14 10:00     ` Vinod Koul
2013-08-15 15:22       ` Robert Jarzmik
2013-08-15 15:30         ` Daniel Mack

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=1375889649-14638-20-git-send-email-zonque@gmail.com \
    --to=zonque@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).