From 6817a69a030b0a815e57470cf5d2e3b577cdcba9 Mon Sep 17 00:00:00 2001 From: Tuukka Toivonen Date: Tue, 2 Feb 2010 11:17:33 -0300 Subject: [media] ARM: OMAP3: Update Camera ISP definitions for OMAP3630 Add new/changed base address definitions and resources for OMAP3630 ISP. The OMAP3430 CSI2PHY block is same as the OMAP3630 CSIPHY2 block. But the later name is chosen as it gives more symmetry to the names. Signed-off-by: Tuukka Toivonen Signed-off-by: Vimarsh Zutshi Acked-by: Tony Lindgren Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-omap2/devices.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2c9c912f2c4..95c69f95d96 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -109,13 +109,33 @@ static struct resource omap3isp_resources[] = { .flags = IORESOURCE_MEM, }, { - .start = OMAP3430_ISP_CSI2A_BASE, - .end = OMAP3430_ISP_CSI2A_END, + .start = OMAP3430_ISP_CSI2A_REGS1_BASE, + .end = OMAP3430_ISP_CSI2A_REGS1_END, .flags = IORESOURCE_MEM, }, { - .start = OMAP3430_ISP_CSI2PHY_BASE, - .end = OMAP3430_ISP_CSI2PHY_END, + .start = OMAP3430_ISP_CSIPHY2_BASE, + .end = OMAP3430_ISP_CSIPHY2_END, + .flags = IORESOURCE_MEM, + }, + { + .start = OMAP3630_ISP_CSI2A_REGS2_BASE, + .end = OMAP3630_ISP_CSI2A_REGS2_END, + .flags = IORESOURCE_MEM, + }, + { + .start = OMAP3630_ISP_CSI2C_REGS1_BASE, + .end = OMAP3630_ISP_CSI2C_REGS1_END, + .flags = IORESOURCE_MEM, + }, + { + .start = OMAP3630_ISP_CSIPHY1_BASE, + .end = OMAP3630_ISP_CSIPHY1_END, + .flags = IORESOURCE_MEM, + }, + { + .start = OMAP3630_ISP_CSI2C_REGS2_BASE, + .end = OMAP3630_ISP_CSI2C_REGS2_END, .flags = IORESOURCE_MEM, }, { -- cgit v1.2.3 From 837c83283daa5ae3831c4dff6bdb75e26aeab4b0 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Mon, 15 Nov 2010 11:29:56 -0300 Subject: [media] omap3: Remove unusued ISP CBUFF resource The ISP CBUFF module isn't use, its resource isn't needed. Signed-off-by: Sergio Aguirre Acked-by: Laurent Pinchart Acked-by: Tony Lindgren Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-omap2/devices.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 95c69f95d96..d3897562aa4 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -68,11 +68,6 @@ static struct resource omap3isp_resources[] = { .end = OMAP3430_ISP_END, .flags = IORESOURCE_MEM, }, - { - .start = OMAP3430_ISP_CBUFF_BASE, - .end = OMAP3430_ISP_CBUFF_END, - .flags = IORESOURCE_MEM, - }, { .start = OMAP3430_ISP_CCP2_BASE, .end = OMAP3430_ISP_CCP2_END, -- cgit v1.2.3 From a11f6706ca4473c2df3f72a306d9b9fee6512a33 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 14 Dec 2009 08:09:07 -0300 Subject: [media] omap3: Add function to register omap3isp platform device structure The omap3isp platform device requires platform data. Instead of registering the device in omap2_init_devices(), export an omap3_init_camera() function to fill the device structure with the platform data pointer and register the device. Signed-off-by: Laurent Pinchart Acked-by: Tony Lindgren Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-omap2/devices.c | 19 ++++++++++--------- arch/arm/mach-omap2/devices.h | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 arch/arm/mach-omap2/devices.h (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index d3897562aa4..6fd92eb9704 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -34,6 +34,8 @@ #include "mux.h" #include "control.h" +#include "devices.h" + #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) static struct resource cam_resources[] = { @@ -59,8 +61,11 @@ static inline void omap_init_camera(void) { platform_device_register(&omap_cam_device); } - -#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) +#else +static inline void omap_init_camera(void) +{ +} +#endif static struct resource omap3isp_resources[] = { { @@ -146,15 +151,11 @@ static struct platform_device omap3isp_device = { .resource = omap3isp_resources, }; -static inline void omap_init_camera(void) -{ - platform_device_register(&omap3isp_device); -} -#else -static inline void omap_init_camera(void) +int omap3_init_camera(struct isp_platform_data *pdata) { + omap3isp_device.dev.platform_data = pdata; + return platform_device_register(&omap3isp_device); } -#endif #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) diff --git a/arch/arm/mach-omap2/devices.h b/arch/arm/mach-omap2/devices.h new file mode 100644 index 00000000000..f61eb6e5d13 --- /dev/null +++ b/arch/arm/mach-omap2/devices.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-omap2/devices.h + * + * OMAP2 platform device setup/initialization + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __ARCH_ARM_MACH_OMAP_DEVICES_H +#define __ARCH_ARM_MACH_OMAP_DEVICES_H + +struct isp_platform_data; + +int omap3_init_camera(struct isp_platform_data *pdata); + +#endif -- cgit v1.2.3 From cfe2cde6d33f15994ad34466ac4a08f5bb348948 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Mon, 15 Nov 2010 11:29:54 -0300 Subject: [media] omap2: Fix camera resources for multiomap Make sure the kernel can be compiled with both OMAP2 and OMAP3 camera support linked in, and give public symbols proper omap2/omap3 prefixes. Signed-off-by: Sergio Aguirre Acked-by: Laurent Pinchart Acked-by: Tony Lindgren Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-omap2/devices.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'arch/arm/mach-omap2') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 6fd92eb9704..145c8f0f659 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -38,7 +38,7 @@ #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) -static struct resource cam_resources[] = { +static struct resource omap2cam_resources[] = { { .start = OMAP24XX_CAMERA_BASE, .end = OMAP24XX_CAMERA_BASE + 0xfff, @@ -50,21 +50,12 @@ static struct resource cam_resources[] = { } }; -static struct platform_device omap_cam_device = { +static struct platform_device omap2cam_device = { .name = "omap24xxcam", .id = -1, - .num_resources = ARRAY_SIZE(cam_resources), - .resource = cam_resources, + .num_resources = ARRAY_SIZE(omap2cam_resources), + .resource = omap2cam_resources, }; - -static inline void omap_init_camera(void) -{ - platform_device_register(&omap_cam_device); -} -#else -static inline void omap_init_camera(void) -{ -} #endif static struct resource omap3isp_resources[] = { @@ -157,6 +148,14 @@ int omap3_init_camera(struct isp_platform_data *pdata) return platform_device_register(&omap3isp_device); } +static inline void omap_init_camera(void) +{ +#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) + if (cpu_is_omap24xx()) + platform_device_register(&omap2cam_device); +#endif +} + #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) #define MBOX_REG_SIZE 0x120 -- cgit v1.2.3