Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / arm / mach-omap2 / dma.c
index 612b9824987351db13d331a7a0c302c091bf4b91..dab9fc014b971cb7834dd518558dbb58de0996c5 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/device.h>
-
+#include <linux/dma-mapping.h>
 #include <linux/omap-dma.h>
 
 #include "soc.h"
@@ -248,7 +248,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 
        p->errata               = configure_dma_errata();
 
-       pdev = omap_device_build(name, 0, oh, p, sizeof(*p), NULL, 0, 0);
+       pdev = omap_device_build(name, 0, oh, p, sizeof(*p));
        kfree(p);
        if (IS_ERR(pdev)) {
                pr_err("%s: Can't build omap_device for %s:%s.\n",
@@ -288,9 +288,26 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
        return 0;
 }
 
+static const struct platform_device_info omap_dma_dev_info = {
+       .name = "omap-dma-engine",
+       .id = -1,
+       .dma_mask = DMA_BIT_MASK(32),
+};
+
 static int __init omap2_system_dma_init(void)
 {
-       return omap_hwmod_for_each_by_class("dma",
+       struct platform_device *pdev;
+       int res;
+
+       res = omap_hwmod_for_each_by_class("dma",
                        omap2_system_dma_init_dev, NULL);
+       if (res)
+               return res;
+
+       pdev = platform_device_register_full(&omap_dma_dev_info);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+
+       return res;
 }
-arch_initcall(omap2_system_dma_init);
+omap_arch_initcall(omap2_system_dma_init);
This page took 0.030408 seconds and 5 git commands to generate.