ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Subsystems (3)
PATCH 1/1 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 e343a895a9f342f239c5e3c5ffc6c0b1707e6244
Merge: 06792c4 193a667
Author: Linus Torvalds <[email protected]>
Date: Tue Jan 10 18:04:27 2012 -0800
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
---
Sorry guys, my bad.
arch/arm/mach-omap2/devices.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/devices.c +13 -1
@@ -28,7 +28,6 @@#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>
@@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = { };#endif +#if defined(CONFIG_IOMMU_API) + +#include <plat/iommu.h> + static struct resource omap3isp_resources[] = { { .start = OMAP3430_ISP_BASE,
@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata) 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 ) {#if defined(CONFIG_VIDEO_OMAP2 ) || defined(CONFIG_VIDEO_OMAP2_MODULE )
Signature · 1 line
1.7.5.4
PATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Hi Ohad,
Quoted 27 lines · On Wednesday 11 January 2012 14:28:11 Ohad Ben-Cohen wrote:
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: 'structdev_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: 'structdev_archdata' has no member named 'iommu'
make[1]: *** [arch/arm/mach-omap2/devices.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2Which happens because while setting up the omap3isp device we try to access the (now nonexistent) iommu member of
dev_archdata.Compile tested with
omap2plus_defconfigon today's:commit
e343a895a9f342f239c5e3c5ffc6c0b1707e6244
Merge: 06792c4 193a667
Author: Linus Torvalds <[email protected]>
Date: Tue Jan 10 18:04:27 2012 -0800Merge tag 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Quoted 6 lines
Reported-by Govindraj Raja <[email protected]>Reported-by Arik Nemtsov <[email protected]>Signed-off-by Ohad Ben-Cohen <[email protected]>Cc Tony Lindgren <[email protected]>Cc Joerg Roedel <[email protected]>Cc Laurent Pinchart <[email protected]>
Quoted 45 lines
---
Sorry guys, my bad.arch/arm/mach-omap2/devices.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)arch/arm/mach-omap2/devices.c +13
-1@@ -28,7 +28,6 @@#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> @@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = { };#endif +#if defined(CONFIG_IOMMU_API) + +#include <plat/iommu.h> + static struct resource omap3isp_resources[] = { { .start = OMAP3430_ISP_BASE,@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata) 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 ) {#if defined(CONFIG_VIDEO_OMAP2 ) || defined(CONFIG_VIDEO_OMAP2_MODULE )
Signature · 3 lines
Regards, Laurent Pinchart
PATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
In reply to Ohad Ben-CohenQuoted 5 lines · Ohad Ben-Cohen
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:
Quoted 8 lines
arch/arm/plat-omap/include/plat/iommu.h: In function 'dev_to_omap_iommu':arch/arm/plat-omap/include/plat/iommu.h:135: error: 'structdev_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: 'structdev_archdata' has no member named 'iommu'
make[1]: *** [arch/arm/mach-omap2/devices.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Will apply it as soon as the merge window closes.
Joerg
Signature · 5 lines
AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
PATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Quoted 1 line · Joerg Roedel
Will apply it as soon as the merge window closes.
Thanks.
Though we might want to consider sending this to Linus before rc1, to eliminate global developers' pain as much as possible :)
PATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Quoted 5 lines · Ohad Ben-Cohen
Quoted 1 line · Joerg Roedel
Will apply it as soon as the merge window closes.
Though we might want to consider sending this to Linus before rc1, to eliminate global developers' pain as much as possible :)
Okay, so I will send out the fix early next week :)
Joerg
Signature · 5 lines
AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
PATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Quoted 1 line · Joerg Roedel
Okay, so I will send out the fix early next week :)
Thanks a lot :)
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
Quoted 4 lines · Ohad Ben-Cohen
Quoted 1 line · Joerg Roedel
Okay, so I will send out the fix early next week :)
Thanks a lot :)
Thanks, here's my ack if you did not apply it yet:
Joerg Roedel
AppliedPATCH 1/1 ARM: OMAP3: fix build on !CONFIG_IOMMU_API
In reply to Ohad Ben-CohenQuoted 14 lines · Ohad Ben-Cohen
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: 'structdev_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: 'structdev_archdata' has no member named 'iommu'
make[1]: *** [arch/arm/mach-omap2/devices.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Quoted 4 lines
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_defconfigon today's:
Applied. Will send pull-request soon.
Signature · 5 lines
AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632