ARM: OMAP3: bind omap3isp_device to its iommu device
authorOhad Ben-Cohen <ohad@wizery.com>
Fri, 23 Sep 2011 13:44:57 +0000 (16:44 +0300)
committerOhad Ben-Cohen <ohad@wizery.com>
Mon, 5 Dec 2011 13:44:12 +0000 (15:44 +0200)
Bind OMAP3's isp device to the isp's dedicated iommu, by setting
the device's archdata iommu member.

This way omap3isp will be able to use the generic IOMMU API without
having to call any omap-specific binding method.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/devices.c

index c15cfada5f13b5975e36c70331e24032f39e2d66..9ceabf02eeb796a9d8c1ca3c4b48e68f78f68879 100644 (file)
@@ -28,6 +28,7 @@
 #include <plat/board.h>
 #include <plat/mcbsp.h>
 #include <plat/mmc.h>
+#include <plat/iommu.h>
 #include <plat/dma.h>
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
@@ -211,9 +212,15 @@ static struct platform_device omap3isp_device = {
        .resource       = omap3isp_resources,
 };
 
+static struct omap_iommu_arch_data omap3_isp_iommu = {
+       .name = "isp",
+};
+
 int omap3_init_camera(struct isp_platform_data *pdata)
 {
        omap3isp_device.dev.platform_data = pdata;
+       omap3isp_device.dev.archdata.iommu = &omap3_isp_iommu;
+
        return platform_device_register(&omap3isp_device);
 }