From: Valentin Longchamp Date: Thu, 7 May 2009 09:51:42 +0000 (+0200) Subject: mx31: add camera device X-Git-Tag: v2.6.31-rc1~344^2~29^2~7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9c70e227e00fcc3b210b11c96652ddcc0b6194f3;p=~shefty%2Frdma-dev.git mx31: add camera device This adds the camera device based on Guennadi's soc_camera architecture for the mx31. The proposed init by Guennadi was removed and must be implemented in the board init file as it contains a lot of board specific info (memory size, clock speed). Signed-off-by: Valentin Longchamp Reviewed-by: Guennadi Liakhovetski Signed-off-by: Sascha Hauer --- diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index f55c9863ea4..d927eddcad4 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -22,10 +22,12 @@ #include #include #include +#include #include #include #include #include +#include #include "devices.h" @@ -346,10 +348,28 @@ struct platform_device mx3_fb = { .num_resources = ARRAY_SIZE(fb_resources), .resource = fb_resources, .dev = { - .coherent_dma_mask = 0xffffffff, + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; +static struct resource camera_resources[] = { + { + .start = IPU_CTRL_BASE_ADDR + 0x60, + .end = IPU_CTRL_BASE_ADDR + 0x87, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device mx3_camera = { + .name = "mx3-camera", + .id = 0, + .num_resources = ARRAY_SIZE(camera_resources), + .resource = camera_resources, + .dev = { + .coherent_dma_mask = DMA_BIT_MASK(32), + }, +}; + static struct resource otg_resources[] = { { .start = OTG_BASE_ADDR, diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 27779c3e93e..475410ada60 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h @@ -11,6 +11,7 @@ extern struct platform_device mxc_i2c_device1; extern struct platform_device mxc_i2c_device2; extern struct platform_device mx3_ipu; extern struct platform_device mx3_fb; +extern struct platform_device mx3_camera; extern struct platform_device mxc_fec_device; extern struct platform_device mxcsdhc_device0; extern struct platform_device mxcsdhc_device1;