summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-02 16:50:55 (GMT)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-17 09:01:24 (GMT)
commitb2997cb12b302ee6d233808e32214d00afdcf128 (patch)
treee9c7896465e257f72846fb0c5b89ed33fb8593ec /arch/arm/mach-imx
parent3bde75b5370bd69fd7f07a8e254bef05b1b5b219 (diff)
downloadlinux-fsl-qoriq-b2997cb12b302ee6d233808e32214d00afdcf128.tar.xz
ARM: imx: dynamically allocate mx2-camera device
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/devices-imx27.h4
-rw-r--r--arch/arm/mach-imx/devices.c32
-rw-r--r--arch/arm/mach-imx/devices.h1
3 files changed, 4 insertions, 33 deletions
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
index b957e78..84b3405 100644
--- a/arch/arm/mach-imx/devices-imx27.h
+++ b/arch/arm/mach-imx/devices-imx27.h
@@ -31,6 +31,10 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst;
#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata)
#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata)
+extern const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst;
+#define imx27_add_mx2_camera(pdata) \
+ imx_add_mx2_camera(&imx27_mx2_camera_data, pdata)
+
extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst;
#define imx27_add_mxc_nand(pdata) \
imx_add_mxc_nand(&imx27_mxc_nand_data, pdata)
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index 31c9d6c..0c5ade4 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -77,38 +77,6 @@ int __init imx1_register_gpios(void)
#endif
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
-
-#ifdef CONFIG_MACH_MX27
-static struct resource mx27_camera_resources[] = {
- {
- .start = MX27_CSI_BASE_ADDR,
- .end = MX27_CSI_BASE_ADDR + 0x1f,
- .flags = IORESOURCE_MEM,
- }, {
- .start = MX27_EMMA_PRP_BASE_ADDR,
- .end = MX27_EMMA_PRP_BASE_ADDR + 0x1f,
- .flags = IORESOURCE_MEM,
- }, {
- .start = MX27_INT_CSI,
- .end = MX27_INT_CSI,
- .flags = IORESOURCE_IRQ,
- },{
- .start = MX27_INT_EMMAPRP,
- .end = MX27_INT_EMMAPRP,
- .flags = IORESOURCE_IRQ,
- },
-};
-struct platform_device mx27_camera_device = {
- .name = "mx2-camera",
- .id = 0,
- .num_resources = ARRAY_SIZE(mx27_camera_resources),
- .resource = mx27_camera_resources,
- .dev = {
- .coherent_dma_mask = 0xffffffff,
- },
-};
-#endif
-
/* Watchdog: i.MX1 has seperate driver, i.MX21 and i.MX27 are equal */
static struct resource mxc_wdt_resources[] = {
{
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h
index 8f14452..3d020b9 100644
--- a/arch/arm/mach-imx/devices.h
+++ b/arch/arm/mach-imx/devices.h
@@ -5,7 +5,6 @@ extern struct platform_device mxc_pwm_device;
extern struct platform_device mxc_sdhc_device0;
extern struct platform_device mxc_sdhc_device1;
extern struct platform_device mxc_otg_udc_device;
-extern struct platform_device mx27_camera_device;
extern struct platform_device mxc_otg_host;
extern struct platform_device mxc_usbh1;
extern struct platform_device mxc_usbh2;