media: omap3isp: Allow it to build with COMPILE_TEST
There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Co-developed-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
ba37e6dd01
commit
243131134b
2 changed files with 10 additions and 4 deletions
|
@ -63,12 +63,10 @@ config VIDEO_MUX
|
||||||
config VIDEO_OMAP3
|
config VIDEO_OMAP3
|
||||||
tristate "OMAP 3 Camera support"
|
tristate "OMAP 3 Camera support"
|
||||||
depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
|
depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
|
||||||
depends on ARCH_OMAP3 || COMPILE_TEST
|
depends on (ARCH_OMAP3 && OMAP_IOMMU) || COMPILE_TEST
|
||||||
depends on ARM
|
|
||||||
depends on COMMON_CLK
|
depends on COMMON_CLK
|
||||||
depends on HAS_DMA && OF
|
depends on HAS_DMA && OF
|
||||||
depends on OMAP_IOMMU
|
select ARM_DMA_USE_IOMMU if OMAP_IOMMU
|
||||||
select ARM_DMA_USE_IOMMU
|
|
||||||
select VIDEOBUF2_DMA_CONTIG
|
select VIDEOBUF2_DMA_CONTIG
|
||||||
select MFD_SYSCON
|
select MFD_SYSCON
|
||||||
select V4L2_FWNODE
|
select V4L2_FWNODE
|
||||||
|
|
|
@ -61,7 +61,9 @@
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARM_DMA_USE_IOMMU
|
||||||
#include <asm/dma-iommu.h>
|
#include <asm/dma-iommu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <media/v4l2-common.h>
|
#include <media/v4l2-common.h>
|
||||||
#include <media/v4l2-fwnode.h>
|
#include <media/v4l2-fwnode.h>
|
||||||
|
@ -1938,13 +1940,16 @@ error_csi2:
|
||||||
|
|
||||||
static void isp_detach_iommu(struct isp_device *isp)
|
static void isp_detach_iommu(struct isp_device *isp)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_ARM_DMA_USE_IOMMU
|
||||||
arm_iommu_detach_device(isp->dev);
|
arm_iommu_detach_device(isp->dev);
|
||||||
arm_iommu_release_mapping(isp->mapping);
|
arm_iommu_release_mapping(isp->mapping);
|
||||||
isp->mapping = NULL;
|
isp->mapping = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int isp_attach_iommu(struct isp_device *isp)
|
static int isp_attach_iommu(struct isp_device *isp)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_ARM_DMA_USE_IOMMU
|
||||||
struct dma_iommu_mapping *mapping;
|
struct dma_iommu_mapping *mapping;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -1973,6 +1978,9 @@ error:
|
||||||
arm_iommu_release_mapping(isp->mapping);
|
arm_iommu_release_mapping(isp->mapping);
|
||||||
isp->mapping = NULL;
|
isp->mapping = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
|
#else
|
||||||
|
return -ENODEV;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue