aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-02 12:50:55 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-17 04:01:24 -0500
commitb2997cb12b302ee6d233808e32214d00afdcf128 (patch)
treee9c7896465e257f72846fb0c5b89ed33fb8593ec /arch/arm/mach-imx
parent3bde75b5370bd69fd7f07a8e254bef05b1b5b219 (diff)
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 b957e78e052b..84b3405e982d 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;
31#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata) 31#define imx27_add_imx_uart4(pdata) imx27_add_imx_uart(4, pdata)
32#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata) 32#define imx27_add_imx_uart5(pdata) imx27_add_imx_uart(5, pdata)
33 33
34extern const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst;
35#define imx27_add_mx2_camera(pdata) \
36 imx_add_mx2_camera(&imx27_mx2_camera_data, pdata)
37
34extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; 38extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst;
35#define imx27_add_mxc_nand(pdata) \ 39#define imx27_add_mxc_nand(pdata) \
36 imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) 40 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 31c9d6c583a3..0c5ade48d598 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)
77#endif 77#endif
78 78
79#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27) 79#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
80
81#ifdef CONFIG_MACH_MX27
82static struct resource mx27_camera_resources[] = {
83 {
84 .start = MX27_CSI_BASE_ADDR,
85 .end = MX27_CSI_BASE_ADDR + 0x1f,
86 .flags = IORESOURCE_MEM,
87 }, {
88 .start = MX27_EMMA_PRP_BASE_ADDR,
89 .end = MX27_EMMA_PRP_BASE_ADDR + 0x1f,
90 .flags = IORESOURCE_MEM,
91 }, {
92 .start = MX27_INT_CSI,
93 .end = MX27_INT_CSI,
94 .flags = IORESOURCE_IRQ,
95 },{
96 .start = MX27_INT_EMMAPRP,
97 .end = MX27_INT_EMMAPRP,
98 .flags = IORESOURCE_IRQ,
99 },
100};
101struct platform_device mx27_camera_device = {
102 .name = "mx2-camera",
103 .id = 0,
104 .num_resources = ARRAY_SIZE(mx27_camera_resources),
105 .resource = mx27_camera_resources,
106 .dev = {
107 .coherent_dma_mask = 0xffffffff,
108 },
109};
110#endif
111
112/* Watchdog: i.MX1 has seperate driver, i.MX21 and i.MX27 are equal */ 80/* Watchdog: i.MX1 has seperate driver, i.MX21 and i.MX27 are equal */
113static struct resource mxc_wdt_resources[] = { 81static struct resource mxc_wdt_resources[] = {
114 { 82 {
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h
index 8f14452c7d23..3d020b91ef5d 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;
5extern struct platform_device mxc_sdhc_device0; 5extern struct platform_device mxc_sdhc_device0;
6extern struct platform_device mxc_sdhc_device1; 6extern struct platform_device mxc_sdhc_device1;
7extern struct platform_device mxc_otg_udc_device; 7extern struct platform_device mxc_otg_udc_device;
8extern struct platform_device mx27_camera_device;
9extern struct platform_device mxc_otg_host; 8extern struct platform_device mxc_otg_host;
10extern struct platform_device mxc_usbh1; 9extern struct platform_device mxc_usbh1;
11extern struct platform_device mxc_usbh2; 10extern struct platform_device mxc_usbh2;