From: snjw23@gmail.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] MX2: Add platform definitions for eMMa-PrP device.
Date: Tue, 22 Nov 2011 20:29:16 +0100 [thread overview]
Message-ID: <4ECBF80C.20701@gmail.com> (raw)
In-Reply-To: <1321963316-9058-2-git-send-email-javier.martin@vista-silicon.com>
Hi Javier,
On 11/22/2011 01:01 PM, Javier Martin wrote:
> eMMa-PrP device included in Freescale i.MX2 chips can also
> be used separately to process memory buffers.
>
> Signed-off-by: Javier Martin<javier.martin@vista-silicon.com>
> ---
> arch/arm/mach-imx/devices-imx27.h | 2 +
> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 33 +++++++++++++++++++++++
> arch/arm/plat-mxc/include/mach/devices-common.h | 2 +
> 3 files changed, 37 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
> index 2f727d7..519aa36 100644
> --- a/arch/arm/mach-imx/devices-imx27.h
> +++ b/arch/arm/mach-imx/devices-imx27.h
> @@ -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_alloc_mx2_emmaprp(pdata) \
> + imx_alloc_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) \
> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> index b3f4828..4a8bd73 100644
> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> @@ -6,6 +6,7 @@
> * the terms of the GNU General Public License version 2 as published by the
> * Free Software Foundation.
> */
> +#include<linux/dma-mapping.h>
> #include<mach/hardware.h>
> #include<mach/devices-common.h>
>
> @@ -62,3 +63,35 @@ 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_alloc_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,
> + },
> + };
> + struct platform_device *pdev;
> + int ret = -ENOMEM;
> +
> + pdev = platform_device_alloc("m2m-emmaprp", 0);
> + if (!pdev)
> + goto err;
> +
> + ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
> + if (ret)
> + goto err;
> +
> + return pdev;
> +err:
> + platform_device_put(pdev);
> + return ERR_PTR(-ENODEV);
I guess you intended to have
+ return ERR_PTR(ret);
here ?
--
Regards,
Sylwester
WARNING: multiple messages have this Message-ID (diff)
From: Sylwester Nawrocki <snjw23@gmail.com>
To: Javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com,
laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com,
hverkuil@xs4all.nl, kyungmin.park@samsung.com,
shawn.guo@linaro.org, richard.zhao@linaro.org,
fabio.estevam@freescale.com, kernel@pengutronix.de,
s.hauer@pengutronix.de, r.schwebel@pengutronix.de
Subject: Re: [PATCH v2 1/2] MX2: Add platform definitions for eMMa-PrP device.
Date: Tue, 22 Nov 2011 20:29:16 +0100 [thread overview]
Message-ID: <4ECBF80C.20701@gmail.com> (raw)
In-Reply-To: <1321963316-9058-2-git-send-email-javier.martin@vista-silicon.com>
Hi Javier,
On 11/22/2011 01:01 PM, Javier Martin wrote:
> eMMa-PrP device included in Freescale i.MX2 chips can also
> be used separately to process memory buffers.
>
> Signed-off-by: Javier Martin<javier.martin@vista-silicon.com>
> ---
> arch/arm/mach-imx/devices-imx27.h | 2 +
> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 33 +++++++++++++++++++++++
> arch/arm/plat-mxc/include/mach/devices-common.h | 2 +
> 3 files changed, 37 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
> index 2f727d7..519aa36 100644
> --- a/arch/arm/mach-imx/devices-imx27.h
> +++ b/arch/arm/mach-imx/devices-imx27.h
> @@ -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_alloc_mx2_emmaprp(pdata) \
> + imx_alloc_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) \
> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> index b3f4828..4a8bd73 100644
> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> @@ -6,6 +6,7 @@
> * the terms of the GNU General Public License version 2 as published by the
> * Free Software Foundation.
> */
> +#include<linux/dma-mapping.h>
> #include<mach/hardware.h>
> #include<mach/devices-common.h>
>
> @@ -62,3 +63,35 @@ 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_alloc_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,
> + },
> + };
> + struct platform_device *pdev;
> + int ret = -ENOMEM;
> +
> + pdev = platform_device_alloc("m2m-emmaprp", 0);
> + if (!pdev)
> + goto err;
> +
> + ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
> + if (ret)
> + goto err;
> +
> + return pdev;
> +err:
> + platform_device_put(pdev);
> + return ERR_PTR(-ENODEV);
I guess you intended to have
+ return ERR_PTR(ret);
here ?
--
Regards,
Sylwester
next prev parent reply other threads:[~2011-11-22 19:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 12:01 Add support form eMMa-PrP in i.MX2 chips as a mem2mem device Javier Martin
2011-11-22 12:01 ` Javier Martin
2011-11-22 12:01 ` [PATCH v2 1/2] MX2: Add platform definitions for eMMa-PrP device Javier Martin
2011-11-22 12:01 ` Javier Martin
2011-11-22 19:29 ` Sylwester Nawrocki [this message]
2011-11-22 19:29 ` Sylwester Nawrocki
2011-11-23 10:05 ` javier Martin
2011-11-23 10:05 ` javier Martin
2011-11-22 21:06 ` Sascha Hauer
2011-11-22 21:06 ` Sascha Hauer
2011-11-23 10:55 ` javier Martin
2011-11-23 10:55 ` javier Martin
2011-11-22 12:01 ` [PATCH v2 2/2] MEM2MEM: Add support for eMMa-PrP mem2mem operations Javier Martin
2011-11-22 12:01 ` Javier Martin
2011-11-22 20:53 ` Sylwester Nawrocki
2011-11-22 20:53 ` Sylwester Nawrocki
2011-11-22 20:55 ` Sascha Hauer
2011-11-22 20:55 ` Sascha Hauer
2011-11-23 10:29 ` javier Martin
2011-11-23 10:29 ` javier Martin
2011-11-23 12:32 ` javier Martin
2011-11-23 12:32 ` javier Martin
2011-11-23 13:12 ` Sascha Hauer
2011-11-23 13:12 ` Sascha Hauer
2011-11-23 13:10 ` Fabio Estevam
2011-11-23 13:10 ` Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECBF80C.20701@gmail.com \
--to=snjw23@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.