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 ++++++++++++++++++++++++---- arch/arm/plat-omap/include/plat/omap34xx.h | 16 ++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2c9c912f2c42..95c69f95d966 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, }, { diff --git a/arch/arm/plat-omap/include/plat/omap34xx.h b/arch/arm/plat-omap/include/plat/omap34xx.h index 98fc8b4a4cc4..b9e85886b9d6 100644 --- a/arch/arm/plat-omap/include/plat/omap34xx.h +++ b/arch/arm/plat-omap/include/plat/omap34xx.h @@ -56,8 +56,12 @@ #define OMAP3430_ISP_RESZ_BASE (OMAP3430_ISP_BASE + 0x1000) #define OMAP3430_ISP_SBL_BASE (OMAP3430_ISP_BASE + 0x1200) #define OMAP3430_ISP_MMU_BASE (OMAP3430_ISP_BASE + 0x1400) -#define OMAP3430_ISP_CSI2A_BASE (OMAP3430_ISP_BASE + 0x1800) -#define OMAP3430_ISP_CSI2PHY_BASE (OMAP3430_ISP_BASE + 0x1970) +#define OMAP3430_ISP_CSI2A_REGS1_BASE (OMAP3430_ISP_BASE + 0x1800) +#define OMAP3430_ISP_CSIPHY2_BASE (OMAP3430_ISP_BASE + 0x1970) +#define OMAP3630_ISP_CSI2A_REGS2_BASE (OMAP3430_ISP_BASE + 0x19C0) +#define OMAP3630_ISP_CSI2C_REGS1_BASE (OMAP3430_ISP_BASE + 0x1C00) +#define OMAP3630_ISP_CSIPHY1_BASE (OMAP3430_ISP_BASE + 0x1D70) +#define OMAP3630_ISP_CSI2C_REGS2_BASE (OMAP3430_ISP_BASE + 0x1DC0) #define OMAP3430_ISP_END (OMAP3430_ISP_BASE + 0x06F) #define OMAP3430_ISP_CBUFF_END (OMAP3430_ISP_CBUFF_BASE + 0x077) @@ -69,8 +73,12 @@ #define OMAP3430_ISP_RESZ_END (OMAP3430_ISP_RESZ_BASE + 0x0AB) #define OMAP3430_ISP_SBL_END (OMAP3430_ISP_SBL_BASE + 0x0FB) #define OMAP3430_ISP_MMU_END (OMAP3430_ISP_MMU_BASE + 0x06F) -#define OMAP3430_ISP_CSI2A_END (OMAP3430_ISP_CSI2A_BASE + 0x16F) -#define OMAP3430_ISP_CSI2PHY_END (OMAP3430_ISP_CSI2PHY_BASE + 0x007) +#define OMAP3430_ISP_CSI2A_REGS1_END (OMAP3430_ISP_CSI2A_REGS1_BASE + 0x16F) +#define OMAP3430_ISP_CSIPHY2_END (OMAP3430_ISP_CSIPHY2_BASE + 0x00B) +#define OMAP3630_ISP_CSI2A_REGS2_END (OMAP3630_ISP_CSI2A_REGS2_BASE + 0x3F) +#define OMAP3630_ISP_CSI2C_REGS1_END (OMAP3630_ISP_CSI2C_REGS1_BASE + 0x16F) +#define OMAP3630_ISP_CSIPHY1_END (OMAP3630_ISP_CSIPHY1_BASE + 0x00B) +#define OMAP3630_ISP_CSI2C_REGS2_END (OMAP3630_ISP_CSI2C_REGS2_BASE + 0x3F) #define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000) #define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000) -- 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') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 95c69f95d966..d3897562aa4a 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') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index d3897562aa4a..6fd92eb97048 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 000000000000..f61eb6e5d136 --- /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') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 6fd92eb97048..145c8f0f6597 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