diff options
author | Gaëtan Carlier <gcembed@gmail.com> | 2012-09-05 07:06:15 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-16 10:21:48 -0500 |
commit | 3ab3a350200c14350220fffde893f3afb640fd25 (patch) | |
tree | 8c8e537f4159ebafe97dc5977b7efd90015eb6f2 /arch/arm/mach-imx/devices | |
parent | 89a4150331bc07014256714678ce8e9b238fc145 (diff) |
ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
This is to prepare addition of m2m-emmapp driver otherwise
IMX_HAVE_PLATFORM_MX2_CAMERA must be declared even if only Post-Processor is
needed.
IMX_HAVE_PLATFORM_MX2_EMMA define has been added.
Changes since v1:
- Add "select IMX_HAVE_PLATFORM_MX2_EMMA" for MACH_IMX27_VISSTRIM_M10 platform
due to pending patch in linux-media tree that will call
imx27_add_mx2_emmaprp().
Signed-off-by: Gaëtan Carlier <gcembed@gmail.com>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/devices')
-rw-r--r-- | arch/arm/mach-imx/devices/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/devices-common.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/platform-mx2-camera.c | 17 |
4 files changed, 12 insertions, 18 deletions
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig index a35d9841f494..9a8f1ca7bcb1 100644 --- a/arch/arm/mach-imx/devices/Kconfig +++ b/arch/arm/mach-imx/devices/Kconfig | |||
@@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA | |||
56 | config IMX_HAVE_PLATFORM_MX2_CAMERA | 56 | config IMX_HAVE_PLATFORM_MX2_CAMERA |
57 | bool | 57 | bool |
58 | 58 | ||
59 | config IMX_HAVE_PLATFORM_MX2_EMMA | ||
60 | bool | ||
61 | |||
59 | config IMX_HAVE_PLATFORM_MXC_EHCI | 62 | config IMX_HAVE_PLATFORM_MXC_EHCI |
60 | bool | 63 | bool |
61 | 64 | ||
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile index 2abe2a5144d0..6acf37e0c119 100644 --- a/arch/arm/mach-imx/devices/Makefile +++ b/arch/arm/mach-imx/devices/Makefile | |||
@@ -30,3 +30,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o | |||
30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o | 30 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o |
31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | 31 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o |
32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o | 32 | obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o |
33 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o | ||
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index e4b790b9e2aa..6277baf1b7be 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -232,8 +232,15 @@ struct imx_mx2_camera_data { | |||
232 | struct platform_device *__init imx_add_mx2_camera( | 232 | struct platform_device *__init imx_add_mx2_camera( |
233 | const struct imx_mx2_camera_data *data, | 233 | const struct imx_mx2_camera_data *data, |
234 | const struct mx2_camera_platform_data *pdata); | 234 | const struct mx2_camera_platform_data *pdata); |
235 | |||
236 | |||
237 | struct imx_mx2_emma_data { | ||
238 | resource_size_t iobase; | ||
239 | resource_size_t iosize; | ||
240 | resource_size_t irq; | ||
241 | }; | ||
235 | struct platform_device *__init imx_add_mx2_emmaprp( | 242 | struct platform_device *__init imx_add_mx2_emmaprp( |
236 | const struct imx_mx2_camera_data *data); | 243 | const struct imx_mx2_emma_data *data); |
237 | 244 | ||
238 | #include <linux/platform_data/usb-ehci-mxc.h> | 245 | #include <linux/platform_data/usb-ehci-mxc.h> |
239 | struct imx_mxc_ehci_data { | 246 | struct imx_mxc_ehci_data { |
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c index f4910160346b..b53e1f348f51 100644 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c | |||
@@ -65,20 +65,3 @@ struct platform_device *__init imx_add_mx2_camera( | |||
65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | 65 | pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
66 | } | 66 | } |
67 | 67 | ||
68 | struct platform_device *__init imx_add_mx2_emmaprp( | ||
69 | const struct imx_mx2_camera_data *data) | ||
70 | { | ||
71 | struct resource res[] = { | ||
72 | { | ||
73 | .start = data->iobaseemmaprp, | ||
74 | .end = data->iobaseemmaprp + data->iosizeemmaprp - 1, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = data->irqemmaprp, | ||
78 | .end = data->irqemmaprp, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | return imx_add_platform_device_dmamask("m2m-emmaprp", 0, | ||
83 | res, 2, NULL, 0, DMA_BIT_MASK(32)); | ||
84 | } | ||