From: mchehab@redhat.com (Mauro Carvalho Chehab)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] MX2: Add platform definitions for eMMa-PrP device.
Date: Thu, 08 Dec 2011 10:58:32 -0200 [thread overview]
Message-ID: <4EE0B478.8080205@redhat.com> (raw)
In-Reply-To: <1322061227-6631-2-git-send-email-javier.martin@vista-silicon.com>
On 23-11-2011 13:13, Javier Martin wrote:
> eMMa-PrP device included in Freescale i.MX2 chips can also
> be used separately to process memory buffers.
This patch is just the arch glue to the driver, so it should be applied via the
media tree, and likely as patch 2, in order to avoid breaking git bisect.
Yet, I'd like to have the mach-imx maintainer's ack on this.
Regards,
Mauro.
>
> Changes since v2:
> - Define imx_add_mx2_emmaprp function which also registers device,
> not only alloc.
> - Change definition of emma_clk.
> - Minor fixes.
>
> Signed-off-by: Javier Martin<javier.martin@vista-silicon.com>
> ---
> arch/arm/mach-imx/clock-imx27.c | 2 +-
> arch/arm/mach-imx/devices-imx27.h | 2 ++
> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 18 ++++++++++++++++++
> arch/arm/plat-mxc/include/mach/devices-common.h | 2 ++
> 4 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
> index 88fe00a..dc2d7a5 100644
> --- a/arch/arm/mach-imx/clock-imx27.c
> +++ b/arch/arm/mach-imx/clock-imx27.c
> @@ -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)
> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
> index 2f727d7..28537a5 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_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) \
> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> index b3f4828..11eace9 100644
> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> @@ -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));
> +}
> diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
> index def9ba5..1b2258d 100644
> --- a/arch/arm/plat-mxc/include/mach/devices-common.h
> +++ b/arch/arm/plat-mxc/include/mach/devices-common.h
> @@ -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 {
WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab@redhat.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 v3 1/2] MX2: Add platform definitions for eMMa-PrP device.
Date: Thu, 08 Dec 2011 10:58:32 -0200 [thread overview]
Message-ID: <4EE0B478.8080205@redhat.com> (raw)
In-Reply-To: <1322061227-6631-2-git-send-email-javier.martin@vista-silicon.com>
On 23-11-2011 13:13, Javier Martin wrote:
> eMMa-PrP device included in Freescale i.MX2 chips can also
> be used separately to process memory buffers.
This patch is just the arch glue to the driver, so it should be applied via the
media tree, and likely as patch 2, in order to avoid breaking git bisect.
Yet, I'd like to have the mach-imx maintainer's ack on this.
Regards,
Mauro.
>
> Changes since v2:
> - Define imx_add_mx2_emmaprp function which also registers device,
> not only alloc.
> - Change definition of emma_clk.
> - Minor fixes.
>
> Signed-off-by: Javier Martin<javier.martin@vista-silicon.com>
> ---
> arch/arm/mach-imx/clock-imx27.c | 2 +-
> arch/arm/mach-imx/devices-imx27.h | 2 ++
> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 18 ++++++++++++++++++
> arch/arm/plat-mxc/include/mach/devices-common.h | 2 ++
> 4 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
> index 88fe00a..dc2d7a5 100644
> --- a/arch/arm/mach-imx/clock-imx27.c
> +++ b/arch/arm/mach-imx/clock-imx27.c
> @@ -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)
> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
> index 2f727d7..28537a5 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_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) \
> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> index b3f4828..11eace9 100644
> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> @@ -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));
> +}
> diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
> index def9ba5..1b2258d 100644
> --- a/arch/arm/plat-mxc/include/mach/devices-common.h
> +++ b/arch/arm/plat-mxc/include/mach/devices-common.h
> @@ -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 {
next prev parent reply other threads:[~2011-12-08 12:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 15:13 [PATCH v3 0/2] Add support form eMMa-PrP in i.MX2 chips as a mem2mem device Javier Martin
2011-11-23 15:13 ` Javier Martin
2011-11-23 15:13 ` [PATCH v3 1/2] MX2: Add platform definitions for eMMa-PrP device Javier Martin
2011-11-23 15:13 ` Javier Martin
2011-12-08 12:58 ` Mauro Carvalho Chehab [this message]
2011-12-08 12:58 ` Mauro Carvalho Chehab
2011-12-09 10:13 ` Sascha Hauer
2011-12-09 10:13 ` Sascha Hauer
2011-11-23 15:13 ` [PATCH v3 2/2] MEM2MEM: Add support for eMMa-PrP mem2mem operations Javier Martin
2011-11-23 15:13 ` Javier Martin
2011-11-23 15:19 ` Fabio Estevam
2011-11-23 15:19 ` Fabio Estevam
2011-11-23 15:23 ` javier Martin
2011-11-23 15:23 ` javier Martin
2011-12-08 12:55 ` Mauro Carvalho Chehab
2011-12-08 12:55 ` Mauro Carvalho Chehab
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=4EE0B478.8080205@redhat.com \
--to=mchehab@redhat.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.