diff options
author | Valentin Longchamp <valentin.longchamp@epfl.ch> | 2009-05-07 05:51:42 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-05-07 10:21:16 -0400 |
commit | 9c70e227e00fcc3b210b11c96652ddcc0b6194f3 (patch) | |
tree | ce1dd49322c177094c2bea88323ee4d0abe416db /arch/arm/mach-mx3 | |
parent | 03c13ecc0d27d6c566afdb9624848fa0e0efe316 (diff) |
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 <valentin.longchamp@epfl.ch>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 1 |
2 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index f55c9863ea42..d927eddcad46 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -22,10 +22,12 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/serial.h> | 23 | #include <linux/serial.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/dma-mapping.h> | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
27 | #include <mach/common.h> | 28 | #include <mach/common.h> |
28 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
30 | #include <mach/mx3_camera.h> | ||
29 | 31 | ||
30 | #include "devices.h" | 32 | #include "devices.h" |
31 | 33 | ||
@@ -346,10 +348,28 @@ struct platform_device mx3_fb = { | |||
346 | .num_resources = ARRAY_SIZE(fb_resources), | 348 | .num_resources = ARRAY_SIZE(fb_resources), |
347 | .resource = fb_resources, | 349 | .resource = fb_resources, |
348 | .dev = { | 350 | .dev = { |
349 | .coherent_dma_mask = 0xffffffff, | 351 | .coherent_dma_mask = DMA_BIT_MASK(32), |
350 | }, | 352 | }, |
351 | }; | 353 | }; |
352 | 354 | ||
355 | static struct resource camera_resources[] = { | ||
356 | { | ||
357 | .start = IPU_CTRL_BASE_ADDR + 0x60, | ||
358 | .end = IPU_CTRL_BASE_ADDR + 0x87, | ||
359 | .flags = IORESOURCE_MEM, | ||
360 | }, | ||
361 | }; | ||
362 | |||
363 | struct platform_device mx3_camera = { | ||
364 | .name = "mx3-camera", | ||
365 | .id = 0, | ||
366 | .num_resources = ARRAY_SIZE(camera_resources), | ||
367 | .resource = camera_resources, | ||
368 | .dev = { | ||
369 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
370 | }, | ||
371 | }; | ||
372 | |||
353 | static struct resource otg_resources[] = { | 373 | static struct resource otg_resources[] = { |
354 | { | 374 | { |
355 | .start = OTG_BASE_ADDR, | 375 | .start = OTG_BASE_ADDR, |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 27779c3e93e7..475410ada60a 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; | |||
11 | extern struct platform_device mxc_i2c_device2; | 11 | extern struct platform_device mxc_i2c_device2; |
12 | extern struct platform_device mx3_ipu; | 12 | extern struct platform_device mx3_ipu; |
13 | extern struct platform_device mx3_fb; | 13 | extern struct platform_device mx3_fb; |
14 | extern struct platform_device mx3_camera; | ||
14 | extern struct platform_device mxc_fec_device; | 15 | extern struct platform_device mxc_fec_device; |
15 | extern struct platform_device mxcsdhc_device0; | 16 | extern struct platform_device mxcsdhc_device0; |
16 | extern struct platform_device mxcsdhc_device1; | 17 | extern struct platform_device mxcsdhc_device1; |