aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/dma.c
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-omap2/dma.c
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-omap2/dma.c')
-rw-r--r--arch/arm/mach-omap2/dma.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index e034ab69a046..5cd8d7668bec 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -27,7 +27,7 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/device.h> 29#include <linux/device.h>
30 30#include <linux/dma-mapping.h>
31#include <linux/omap-dma.h> 31#include <linux/omap-dma.h>
32 32
33#include "soc.h" 33#include "soc.h"
@@ -288,9 +288,26 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
288 return 0; 288 return 0;
289} 289}
290 290
291static const struct platform_device_info omap_dma_dev_info = {
292 .name = "omap-dma-engine",
293 .id = -1,
294 .dma_mask = DMA_BIT_MASK(32),
295};
296
291static int __init omap2_system_dma_init(void) 297static int __init omap2_system_dma_init(void)
292{ 298{
293 return omap_hwmod_for_each_by_class("dma", 299 struct platform_device *pdev;
300 int res;
301
302 res = omap_hwmod_for_each_by_class("dma",
294 omap2_system_dma_init_dev, NULL); 303 omap2_system_dma_init_dev, NULL);
304 if (res)
305 return res;
306
307 pdev = platform_device_register_full(&omap_dma_dev_info);
308 if (IS_ERR(pdev))
309 return PTR_ERR(pdev);
310
311 return res;
295} 312}
296omap_arch_initcall(omap2_system_dma_init); 313omap_arch_initcall(omap2_system_dma_init);