aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-01-11 14:24:19 -0500
committerTony Lindgren <tony@atomide.com>2013-01-11 14:24:19 -0500
commitbe1f94812c2cc0aaf696d39fe23104763ea52b5b (patch)
tree2f9789af80ad91ad976a824548c0c2aa4d9b591f /arch/arm/mach-omap1
parenta6cf912c6047077a6eb860ed8dbfa342376ee395 (diff)
ARM: OMAP: Fix dmaengine init for multiplatform
Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead. Cc: Russell King <linux@arm.linux.org.uk> Cc: Dan Williams <djbw@fb.com> Cc: Vinod Koul <vinod.koul@intel.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/dma.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index e190611e4b46..1a4e887f028d 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -24,7 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/io.h> 26#include <linux/io.h>
27 27#include <linux/dma-mapping.h>
28#include <linux/omap-dma.h> 28#include <linux/omap-dma.h>
29#include <mach/tc.h> 29#include <mach/tc.h>
30 30
@@ -270,11 +270,17 @@ static u32 configure_dma_errata(void)
270 return errata; 270 return errata;
271} 271}
272 272
273static const struct platform_device_info omap_dma_dev_info = {
274 .name = "omap-dma-engine",
275 .id = -1,
276 .dma_mask = DMA_BIT_MASK(32),
277};
278
273static int __init omap1_system_dma_init(void) 279static int __init omap1_system_dma_init(void)
274{ 280{
275 struct omap_system_dma_plat_info *p; 281 struct omap_system_dma_plat_info *p;
276 struct omap_dma_dev_attr *d; 282 struct omap_dma_dev_attr *d;
277 struct platform_device *pdev; 283 struct platform_device *pdev, *dma_pdev;
278 int ret; 284 int ret;
279 285
280 pdev = platform_device_alloc("omap_dma_system", 0); 286 pdev = platform_device_alloc("omap_dma_system", 0);
@@ -380,8 +386,16 @@ static int __init omap1_system_dma_init(void)
380 dma_common_ch_start = CPC; 386 dma_common_ch_start = CPC;
381 dma_common_ch_end = COLOR; 387 dma_common_ch_end = COLOR;
382 388
389 dma_pdev = platform_device_register_full(&omap_dma_dev_info);
390 if (IS_ERR(dma_pdev)) {
391 ret = PTR_ERR(dma_pdev);
392 goto exit_release_pdev;
393 }
394
383 return ret; 395 return ret;
384 396
397exit_release_pdev:
398 platform_device_del(pdev);
385exit_release_chan: 399exit_release_chan:
386 kfree(d->chan); 400 kfree(d->chan);
387exit_release_d: 401exit_release_d: