[media] MX2: Add platform definitions for eMMa-PrP device
authorJavier Martin <javier.martin@vista-silicon.com>
Fri, 13 Jan 2012 09:31:57 +0000 (06:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 28 Feb 2012 10:20:32 +0000 (07:20 -0300)
eMMa-PrP device included in Freescale i.MX2 chips can also
be used separately to process memory buffers. This patch
provides arch glue code for the driver which provides this
functionality.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
arch/arm/mach-imx/clock-imx27.c
arch/arm/mach-imx/devices-imx27.h
arch/arm/plat-mxc/devices/platform-mx2-camera.c
arch/arm/plat-mxc/include/mach/devices-common.h

index 88fe00a146e3cc8b7a6b1ce02e9607eb6e6edf59..dc2d7a511d9bbde2c026866a75f0ccaffe5ffbc7 100644 (file)
@@ -661,7 +661,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK(NULL, "dma", dma_clk)
        _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
        _REGISTER_CLOCK(NULL, "brom", brom_clk)
-       _REGISTER_CLOCK(NULL, "emma", emma_clk)
+       _REGISTER_CLOCK("m2m-emmaprp.0", NULL, emma_clk)
        _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk)
        _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
        _REGISTER_CLOCK(NULL, "emi", emi_clk)
index 2f727d7c380c1e57b748f34e1a00f9730e0b27c2..28537a5d904801a1c38a8d5bac171bbd2104e9cf 100644 (file)
@@ -50,6 +50,8 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[];
 extern const struct imx_mx2_camera_data imx27_mx2_camera_data;
 #define imx27_add_mx2_camera(pdata)    \
        imx_add_mx2_camera(&imx27_mx2_camera_data, pdata)
+#define imx27_add_mx2_emmaprp(pdata)   \
+       imx_add_mx2_emmaprp(&imx27_mx2_camera_data)
 
 extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data;
 #define imx27_add_mxc_ehci_otg(pdata)  \
index b3f4828dc447ee52d663aadddc1858f5095208cc..11eace953a09e5df8adecc4a4ec283327998cc1c 100644 (file)
@@ -62,3 +62,21 @@ struct platform_device *__init imx_add_mx2_camera(
                        res, data->iobaseemmaprp ? 4 : 2,
                        pdata, sizeof(*pdata), DMA_BIT_MASK(32));
 }
+
+struct platform_device *__init imx_add_mx2_emmaprp(
+               const struct imx_mx2_camera_data *data)
+{
+       struct resource res[] = {
+               {
+                       .start = data->iobaseemmaprp,
+                       .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
+                       .flags = IORESOURCE_MEM,
+               }, {
+                       .start = data->irqemmaprp,
+                       .end = data->irqemmaprp,
+                       .flags = IORESOURCE_IRQ,
+               },
+       };
+       return imx_add_platform_device_dmamask("m2m-emmaprp", 0,
+                       res, 2, NULL, 0, DMA_BIT_MASK(32));
+}
index def9ba53e23a6eebf343a96a384e6daf9b20168c..1b2258daa05b22849cd9e028228187ee852793c2 100644 (file)
@@ -223,6 +223,8 @@ struct imx_mx2_camera_data {
 struct platform_device *__init imx_add_mx2_camera(
                const struct imx_mx2_camera_data *data,
                const struct mx2_camera_platform_data *pdata);
+struct platform_device *__init imx_add_mx2_emmaprp(
+               const struct imx_mx2_camera_data *data);
 
 #include <mach/mxc_ehci.h>
 struct imx_mxc_ehci_data {