summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/devices.c
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@epfl.ch>2009-05-07 11:51:42 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-07 16:21:16 +0200
commit9c70e227e00fcc3b210b11c96652ddcc0b6194f3 (patch)
treece1dd49322c177094c2bea88323ee4d0abe416db /arch/arm/mach-mx3/devices.c
parent03c13ecc0d27d6c566afdb9624848fa0e0efe316 (diff)
downloadblackbird-op-linux-9c70e227e00fcc3b210b11c96652ddcc0b6194f3.tar.gz
blackbird-op-linux-9c70e227e00fcc3b210b11c96652ddcc0b6194f3.zip
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/devices.c')
-rw-r--r--arch/arm/mach-mx3/devices.c22
1 files changed, 21 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 @@
#include <linux/platform_device.h>
#include <linux/serial.h>
#include <linux/gpio.h>
+#include <linux/dma-mapping.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/common.h>
#include <mach/imx-uart.h>
+#include <mach/mx3_camera.h>
#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,
OpenPOWER on IntegriCloud