diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-02 12:50:55 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 04:01:24 -0500 |
commit | b2997cb12b302ee6d233808e32214d00afdcf128 (patch) | |
tree | e9c7896465e257f72846fb0c5b89ed33fb8593ec /arch/arm/mach-imx | |
parent | 3bde75b5370bd69fd7f07a8e254bef05b1b5b219 (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.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 1 |
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 | ||
34 | extern 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 | |||
34 | extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; | 38 | extern 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 | ||
82 | static 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 | }; | ||
101 | struct 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 */ |
113 | static struct resource mxc_wdt_resources[] = { | 81 | static 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; | |||
5 | extern struct platform_device mxc_sdhc_device0; | 5 | extern struct platform_device mxc_sdhc_device0; |
6 | extern struct platform_device mxc_sdhc_device1; | 6 | extern struct platform_device mxc_sdhc_device1; |
7 | extern struct platform_device mxc_otg_udc_device; | 7 | extern struct platform_device mxc_otg_udc_device; |
8 | extern struct platform_device mx27_camera_device; | ||
9 | extern struct platform_device mxc_otg_host; | 8 | extern struct platform_device mxc_otg_host; |
10 | extern struct platform_device mxc_usbh1; | 9 | extern struct platform_device mxc_usbh1; |
11 | extern struct platform_device mxc_usbh2; | 10 | extern struct platform_device mxc_usbh2; |