Skip to content

Commit

Permalink
omap3isp: Remove iommu_group related code
Browse files Browse the repository at this point in the history
The OMAP IOMMU driver has added the support for IOMMU groups internally,
and the ISP device is automatically linked to the appropriate IOMMU group.
So, remove the explicit function calls that creates/deletes an iommu_group
and adds the ISP device to this group.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Suman Anna authored and Joerg Roedel committed Apr 20, 2017
1 parent 28ae1e3 commit fd8e2d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
17 changes: 0 additions & 17 deletions drivers/media/platform/omap3isp/isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1943,30 +1943,13 @@ static void isp_detach_iommu(struct isp_device *isp)
{
arm_iommu_release_mapping(isp->mapping);
isp->mapping = NULL;
iommu_group_remove_device(isp->dev);
}

static int isp_attach_iommu(struct isp_device *isp)
{
struct dma_iommu_mapping *mapping;
struct iommu_group *group;
int ret;

/* Create a device group and add the device to it. */
group = iommu_group_alloc();
if (IS_ERR(group)) {
dev_err(isp->dev, "failed to allocate IOMMU group\n");
return PTR_ERR(group);
}

ret = iommu_group_add_device(group, isp->dev);
iommu_group_put(group);

if (ret < 0) {
dev_err(isp->dev, "failed to add device to IPMMU group\n");
return ret;
}

/*
* Create the ARM mapping, used by the ARM DMA mapping core to allocate
* VAs. This will allocate a corresponding IOMMU domain.
Expand Down
1 change: 0 additions & 1 deletion drivers/media/platform/omap3isp/isp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/iommu.h>
#include <linux/platform_device.h>
#include <linux/wait.h>

Expand Down

0 comments on commit fd8e2d4

Please sign in to comment.