Commit 1a51a0ce authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen Committed by Joerg Roedel

ARM: OMAP3: fix build on !CONFIG_IOMMU_API

omap3isp depends on CONFIG_IOMMU_API, so avoid registering its
device (and defining its configuration structs) on !CONFIG_IOMMU_API.

This is generally nice to have, but more importantly, it fixes:

arch/arm/plat-omap/include/plat/iommu.h: In function 'dev_to_omap_iommu':
arch/arm/plat-omap/include/plat/iommu.h:135: error: 'struct
dev_archdata' has no member named 'iommu'
arch/arm/mach-omap2/devices.c: In function 'omap3_init_camera':
arch/arm/mach-omap2/devices.c:222: error: 'struct dev_archdata' has no
member named 'iommu'
make[1]: *** [arch/arm/mach-omap2/devices.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

Which happens because while setting up the omap3isp device we try
to access the (now nonexistent) iommu member of dev_archdata.

Compile tested with omap2plus_defconfig on today's:

commit e343a895
Merge: 06792c4d 193a667f
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Tue Jan 10 18:04:27 2012 -0800

    Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostReported-by: default avatarGovindraj Raja <govindraj.raja@ti.com>
Reported-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Joerg Roedel <Joerg.Roedel@amd.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent f93ea733
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/mcbsp.h> #include <plat/mcbsp.h>
#include <plat/mmc.h> #include <plat/mmc.h>
#include <plat/iommu.h>
#include <plat/dma.h> #include <plat/dma.h>
#include <plat/omap_hwmod.h> #include <plat/omap_hwmod.h>
#include <plat/omap_device.h> #include <plat/omap_device.h>
...@@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = { ...@@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = {
}; };
#endif #endif
#if defined(CONFIG_IOMMU_API)
#include <plat/iommu.h>
static struct resource omap3isp_resources[] = { static struct resource omap3isp_resources[] = {
{ {
.start = OMAP3430_ISP_BASE, .start = OMAP3430_ISP_BASE,
...@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata) ...@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata)
return platform_device_register(&omap3isp_device); return platform_device_register(&omap3isp_device);
} }
#else /* !CONFIG_IOMMU_API */
int omap3_init_camera(struct isp_platform_data *pdata)
{
return 0;
}
#endif
static inline void omap_init_camera(void) static inline void omap_init_camera(void)
{ {
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment