* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
@ 2012-09-05 11:06 Gaëtan Carlier
2012-09-11 9:47 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Gaëtan Carlier @ 2012-09-05 11:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
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>
---
arch/arm/mach-imx/Kconfig | 1 +
arch/arm/mach-imx/devices-imx27.h | 4 ++-
arch/arm/plat-mxc/devices/Kconfig | 3 ++
arch/arm/plat-mxc/devices/Makefile | 1 +
arch/arm/plat-mxc/devices/platform-mx2-camera.c | 17 ---------
arch/arm/plat-mxc/devices/platform-mx2-emma.c | 41 +++++++++++++++++++++++
arch/arm/plat-mxc/include/mach/devices-common.h | 9 ++++-
7 files changed, 57 insertions(+), 19 deletions(-)
create mode 100644 arch/arm/plat-mxc/devices/platform-mx2-emma.c
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index afd542a..c2984d7 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -322,6 +322,7 @@ config MACH_IMX27_VISSTRIM_M10
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MX2_CAMERA
+ select IMX_HAVE_PLATFORM_MX2_EMMA
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select LEDS_GPIO_REGISTER
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
index 0482293..d8eb4a0 100644
--- a/arch/arm/mach-imx/devices-imx27.h
+++ b/arch/arm/mach-imx/devices-imx27.h
@@ -54,8 +54,10 @@ 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)
+
+extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data;
#define imx27_add_mx2_emmaprp() \
- imx_add_mx2_emmaprp(&imx27_mx2_camera_data)
+ imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_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/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 6b46cee..96feef7 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA
config IMX_HAVE_PLATFORM_MX2_CAMERA
bool
+config IMX_HAVE_PLATFORM_MX2_EMMA
+ bool
+
config IMX_HAVE_PLATFORM_MXC_EHCI
bool
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index 76f3195..7292c1f 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -28,3 +28,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o
+obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o
diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
index 11eace9..11c688f 100644
--- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
+++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
@@ -63,20 +63,3 @@ struct platform_device *__init imx_add_mx2_camera(
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/devices/platform-mx2-emma.c b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
new file mode 100644
index 0000000..a51749a
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Pengutronix
+ * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License version 2 as published by the
+ * Free Software Foundation.
+ */
+#include <mach/hardware.h>
+#include <mach/devices-common.h>
+
+#define imx_mx2_emmaprp_data_entry_single(soc) \
+ { \
+ .iobase = soc ## _EMMAPRP_BASE_ADDR, \
+ .iosize = SZ_32, \
+ .irq = soc ## _INT_EMMAPRP, \
+ }
+
+#ifdef CONFIG_SOC_IMX27
+const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst =
+ imx_mx2_emmaprp_data_entry_single(MX27);
+#endif /* ifdef CONFIG_SOC_IMX27 */
+
+struct platform_device *__init imx_add_mx2_emmaprp(
+ const struct imx_mx2_emma_data *data)
+{
+ struct resource res[] = {
+ {
+ .start = data->iobase,
+ .end = data->iobase + data->iosize - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = data->irq,
+ .end = data->irq,
+ .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 762780c..2117072 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -229,8 +229,15 @@ 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 imx_mx2_emma_data {
+ resource_size_t iobase;
+ resource_size_t iosize;
+ resource_size_t irq;
+};
struct platform_device *__init imx_add_mx2_emmaprp(
- const struct imx_mx2_camera_data *data);
+ const struct imx_mx2_emma_data *data);
#include <mach/mxc_ehci.h>
struct imx_mxc_ehci_data {
--
1.7.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
2012-09-05 11:06 [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA Gaëtan Carlier
@ 2012-09-11 9:47 ` Sascha Hauer
2012-09-11 11:13 ` javier Martin
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-09-11 9:47 UTC (permalink / raw)
To: linux-arm-kernel
Hi Javier,
Since you worked in this area recently, can I have your Ack on this?
As a side note: Please be prepared that all this should be removed in
the not-so-far future. It would be good if you start converting your
boards to devicetree soon. You may be doing so internally already, I
don't know.
Thanks
Sascha
On Wed, Sep 05, 2012 at 01:06:15PM +0200, Ga?tan Carlier wrote:
> Hi,
> 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>
> ---
> arch/arm/mach-imx/Kconfig | 1 +
> arch/arm/mach-imx/devices-imx27.h | 4 ++-
> arch/arm/plat-mxc/devices/Kconfig | 3 ++
> arch/arm/plat-mxc/devices/Makefile | 1 +
> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 17 ---------
> arch/arm/plat-mxc/devices/platform-mx2-emma.c | 41 +++++++++++++++++++++++
> arch/arm/plat-mxc/include/mach/devices-common.h | 9 ++++-
> 7 files changed, 57 insertions(+), 19 deletions(-)
> create mode 100644 arch/arm/plat-mxc/devices/platform-mx2-emma.c
>
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index afd542a..c2984d7 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -322,6 +322,7 @@ config MACH_IMX27_VISSTRIM_M10
> select IMX_HAVE_PLATFORM_IMX_SSI
> select IMX_HAVE_PLATFORM_IMX_UART
> select IMX_HAVE_PLATFORM_MX2_CAMERA
> + select IMX_HAVE_PLATFORM_MX2_EMMA
> select IMX_HAVE_PLATFORM_MXC_EHCI
> select IMX_HAVE_PLATFORM_MXC_MMC
> select LEDS_GPIO_REGISTER
> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
> index 0482293..d8eb4a0 100644
> --- a/arch/arm/mach-imx/devices-imx27.h
> +++ b/arch/arm/mach-imx/devices-imx27.h
> @@ -54,8 +54,10 @@ 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)
> +
> +extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data;
> #define imx27_add_mx2_emmaprp() \
> - imx_add_mx2_emmaprp(&imx27_mx2_camera_data)
> + imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_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/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
> index 6b46cee..96feef7 100644
> --- a/arch/arm/plat-mxc/devices/Kconfig
> +++ b/arch/arm/plat-mxc/devices/Kconfig
> @@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA
> config IMX_HAVE_PLATFORM_MX2_CAMERA
> bool
>
> +config IMX_HAVE_PLATFORM_MX2_EMMA
> + bool
> +
> config IMX_HAVE_PLATFORM_MXC_EHCI
> bool
>
> diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
> index 76f3195..7292c1f 100644
> --- a/arch/arm/plat-mxc/devices/Makefile
> +++ b/arch/arm/plat-mxc/devices/Makefile
> @@ -28,3 +28,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o
> obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o
> +obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o
> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> index 11eace9..11c688f 100644
> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
> @@ -63,20 +63,3 @@ struct platform_device *__init imx_add_mx2_camera(
> 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/devices/platform-mx2-emma.c b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
> new file mode 100644
> index 0000000..a51749a
> --- /dev/null
> +++ b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
> @@ -0,0 +1,41 @@
> +/*
> + * Copyright (C) 2010 Pengutronix
> + * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
> + *
> + * This program is free software; you can redistribute it and/or modify it under
> + * the terms of the GNU General Public License version 2 as published by the
> + * Free Software Foundation.
> + */
> +#include <mach/hardware.h>
> +#include <mach/devices-common.h>
> +
> +#define imx_mx2_emmaprp_data_entry_single(soc) \
> + { \
> + .iobase = soc ## _EMMAPRP_BASE_ADDR, \
> + .iosize = SZ_32, \
> + .irq = soc ## _INT_EMMAPRP, \
> + }
> +
> +#ifdef CONFIG_SOC_IMX27
> +const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst =
> + imx_mx2_emmaprp_data_entry_single(MX27);
> +#endif /* ifdef CONFIG_SOC_IMX27 */
> +
> +struct platform_device *__init imx_add_mx2_emmaprp(
> + const struct imx_mx2_emma_data *data)
> +{
> + struct resource res[] = {
> + {
> + .start = data->iobase,
> + .end = data->iobase + data->iosize - 1,
> + .flags = IORESOURCE_MEM,
> + }, {
> + .start = data->irq,
> + .end = data->irq,
> + .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 762780c..2117072 100644
> --- a/arch/arm/plat-mxc/include/mach/devices-common.h
> +++ b/arch/arm/plat-mxc/include/mach/devices-common.h
> @@ -229,8 +229,15 @@ 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 imx_mx2_emma_data {
> + resource_size_t iobase;
> + resource_size_t iosize;
> + resource_size_t irq;
> +};
> struct platform_device *__init imx_add_mx2_emmaprp(
> - const struct imx_mx2_camera_data *data);
> + const struct imx_mx2_emma_data *data);
>
> #include <mach/mxc_ehci.h>
> struct imx_mxc_ehci_data {
> --
> 1.7.7.4
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
2012-09-11 9:47 ` Sascha Hauer
@ 2012-09-11 11:13 ` javier Martin
2012-09-11 11:17 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: javier Martin @ 2012-09-11 11:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 11 September 2012 11:47, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Hi Javier,
>
> Since you worked in this area recently, can I have your Ack on this?
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
> As a side note: Please be prepared that all this should be removed in
> the not-so-far future. It would be good if you start converting your
> boards to devicetree soon. You may be doing so internally already, I
> don't know.
We made some tests regarding devicetree this summer but we found that
there are some things missing yet:
- pinctrl
- soc-camera and video sensor
I don't know if people from Linaro is planning to deal with pinctrl
for i.MX27 or not.
> Thanks
> Sascha
>
> On Wed, Sep 05, 2012 at 01:06:15PM +0200, Ga?tan Carlier wrote:
>> Hi,
>> 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>
>> ---
>> arch/arm/mach-imx/Kconfig | 1 +
>> arch/arm/mach-imx/devices-imx27.h | 4 ++-
>> arch/arm/plat-mxc/devices/Kconfig | 3 ++
>> arch/arm/plat-mxc/devices/Makefile | 1 +
>> arch/arm/plat-mxc/devices/platform-mx2-camera.c | 17 ---------
>> arch/arm/plat-mxc/devices/platform-mx2-emma.c | 41 +++++++++++++++++++++++
>> arch/arm/plat-mxc/include/mach/devices-common.h | 9 ++++-
>> 7 files changed, 57 insertions(+), 19 deletions(-)
>> create mode 100644 arch/arm/plat-mxc/devices/platform-mx2-emma.c
>>
>> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
>> index afd542a..c2984d7 100644
>> --- a/arch/arm/mach-imx/Kconfig
>> +++ b/arch/arm/mach-imx/Kconfig
>> @@ -322,6 +322,7 @@ config MACH_IMX27_VISSTRIM_M10
>> select IMX_HAVE_PLATFORM_IMX_SSI
>> select IMX_HAVE_PLATFORM_IMX_UART
>> select IMX_HAVE_PLATFORM_MX2_CAMERA
>> + select IMX_HAVE_PLATFORM_MX2_EMMA
>> select IMX_HAVE_PLATFORM_MXC_EHCI
>> select IMX_HAVE_PLATFORM_MXC_MMC
>> select LEDS_GPIO_REGISTER
>> diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h
>> index 0482293..d8eb4a0 100644
>> --- a/arch/arm/mach-imx/devices-imx27.h
>> +++ b/arch/arm/mach-imx/devices-imx27.h
>> @@ -54,8 +54,10 @@ 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)
>> +
>> +extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data;
>> #define imx27_add_mx2_emmaprp() \
>> - imx_add_mx2_emmaprp(&imx27_mx2_camera_data)
>> + imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_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/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
>> index 6b46cee..96feef7 100644
>> --- a/arch/arm/plat-mxc/devices/Kconfig
>> +++ b/arch/arm/plat-mxc/devices/Kconfig
>> @@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA
>> config IMX_HAVE_PLATFORM_MX2_CAMERA
>> bool
>>
>> +config IMX_HAVE_PLATFORM_MX2_EMMA
>> + bool
>> +
>> config IMX_HAVE_PLATFORM_MXC_EHCI
>> bool
>>
>> diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
>> index 76f3195..7292c1f 100644
>> --- a/arch/arm/plat-mxc/devices/Makefile
>> +++ b/arch/arm/plat-mxc/devices/Makefile
>> @@ -28,3 +28,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
>> obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
>> obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o
>> obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o
>> +obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o
>> diff --git a/arch/arm/plat-mxc/devices/platform-mx2-camera.c b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
>> index 11eace9..11c688f 100644
>> --- a/arch/arm/plat-mxc/devices/platform-mx2-camera.c
>> +++ b/arch/arm/plat-mxc/devices/platform-mx2-camera.c
>> @@ -63,20 +63,3 @@ struct platform_device *__init imx_add_mx2_camera(
>> 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/devices/platform-mx2-emma.c b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
>> new file mode 100644
>> index 0000000..a51749a
>> --- /dev/null
>> +++ b/arch/arm/plat-mxc/devices/platform-mx2-emma.c
>> @@ -0,0 +1,41 @@
>> +/*
>> + * Copyright (C) 2010 Pengutronix
>> + * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
>> + *
>> + * This program is free software; you can redistribute it and/or modify it under
>> + * the terms of the GNU General Public License version 2 as published by the
>> + * Free Software Foundation.
>> + */
>> +#include <mach/hardware.h>
>> +#include <mach/devices-common.h>
>> +
>> +#define imx_mx2_emmaprp_data_entry_single(soc) \
>> + { \
>> + .iobase = soc ## _EMMAPRP_BASE_ADDR, \
>> + .iosize = SZ_32, \
>> + .irq = soc ## _INT_EMMAPRP, \
>> + }
>> +
>> +#ifdef CONFIG_SOC_IMX27
>> +const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst =
>> + imx_mx2_emmaprp_data_entry_single(MX27);
>> +#endif /* ifdef CONFIG_SOC_IMX27 */
>> +
>> +struct platform_device *__init imx_add_mx2_emmaprp(
>> + const struct imx_mx2_emma_data *data)
>> +{
>> + struct resource res[] = {
>> + {
>> + .start = data->iobase,
>> + .end = data->iobase + data->iosize - 1,
>> + .flags = IORESOURCE_MEM,
>> + }, {
>> + .start = data->irq,
>> + .end = data->irq,
>> + .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 762780c..2117072 100644
>> --- a/arch/arm/plat-mxc/include/mach/devices-common.h
>> +++ b/arch/arm/plat-mxc/include/mach/devices-common.h
>> @@ -229,8 +229,15 @@ 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 imx_mx2_emma_data {
>> + resource_size_t iobase;
>> + resource_size_t iosize;
>> + resource_size_t irq;
>> +};
>> struct platform_device *__init imx_add_mx2_emmaprp(
>> - const struct imx_mx2_camera_data *data);
>> + const struct imx_mx2_emma_data *data);
>>
>> #include <mach/mxc_ehci.h>
>> struct imx_mxc_ehci_data {
>> --
>> 1.7.7.4
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
2012-09-11 11:13 ` javier Martin
@ 2012-09-11 11:17 ` Sascha Hauer
2012-10-09 13:01 ` Gaëtan Carlier
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-09-11 11:17 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 11, 2012 at 01:13:03PM +0200, javier Martin wrote:
> Hi,
>
> On 11 September 2012 11:47, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Hi Javier,
> >
> > Since you worked in this area recently, can I have your Ack on this?
>
> Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Thanks
>
> > As a side note: Please be prepared that all this should be removed in
> > the not-so-far future. It would be good if you start converting your
> > boards to devicetree soon. You may be doing so internally already, I
> > don't know.
>
> We made some tests regarding devicetree this summer but we found that
> there are some things missing yet:
> - pinctrl
> - soc-camera and video sensor
>
> I don't know if people from Linaro is planning to deal with pinctrl
> for i.MX27 or not.
I don't think Linaro will do anything for the older i.MX like the
i.MX27. With soc-camera I'm optimistic that someone will come up
with patches soon.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
2012-09-11 11:17 ` Sascha Hauer
@ 2012-10-09 13:01 ` Gaëtan Carlier
2012-10-10 8:34 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Gaëtan Carlier @ 2012-10-09 13:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sascha,
On 09/11/2012 01:17 PM, Sascha Hauer wrote:
> On Tue, Sep 11, 2012 at 01:13:03PM +0200, javier Martin wrote:
>> Hi,
>>
>> On 11 September 2012 11:47, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>>> Hi Javier,
>>>
>>> Since you worked in this area recently, can I have your Ack on this?
>>
>> Acked-by: Javier Martin <javier.martin@vista-silicon.com>
>
> Thanks
This patch is missing in next-20121008 and seems to be never committed.
Is there any reason ?
>
>>
>>> As a side note: Please be prepared that all this should be removed in
>>> the not-so-far future. It would be good if you start converting your
>>> boards to devicetree soon. You may be doing so internally already, I
>>> don't know.
>>
>> We made some tests regarding devicetree this summer but we found that
>> there are some things missing yet:
>> - pinctrl
>> - soc-camera and video sensor
>>
>> I don't know if people from Linaro is planning to deal with pinctrl
>> for i.MX27 or not.
>
> I don't think Linaro will do anything for the older i.MX like the
> i.MX27. With soc-camera I'm optimistic that someone will come up
> with patches soon.
>
> Sascha
>
Thank you.
Best regards,
Ga?tan Carlier.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA
2012-10-09 13:01 ` Gaëtan Carlier
@ 2012-10-10 8:34 ` Sascha Hauer
0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-10-10 8:34 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 09, 2012 at 03:01:35PM +0200, Ga?tan Carlier wrote:
> Hi Sascha,
> On 09/11/2012 01:17 PM, Sascha Hauer wrote:
> >On Tue, Sep 11, 2012 at 01:13:03PM +0200, javier Martin wrote:
> >>Hi,
> >>
> >>On 11 September 2012 11:47, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >>>Hi Javier,
> >>>
> >>>Since you worked in this area recently, can I have your Ack on this?
> >>
> >>Acked-by: Javier Martin <javier.martin@vista-silicon.com>
> >
> >Thanks
> This patch is missing in next-20121008 and seems to be never
> committed. Is there any reason ?
Sorry, I simply missed to apply it :(
Did that now.
Sascha
> >
> >>
> >>>As a side note: Please be prepared that all this should be removed in
> >>>the not-so-far future. It would be good if you start converting your
> >>>boards to devicetree soon. You may be doing so internally already, I
> >>>don't know.
> >>
> >>We made some tests regarding devicetree this summer but we found that
> >>there are some things missing yet:
> >>- pinctrl
> >>- soc-camera and video sensor
> >>
> >>I don't know if people from Linaro is planning to deal with pinctrl
> >>for i.MX27 or not.
> >
> >I don't think Linaro will do anything for the older i.MX like the
> >i.MX27. With soc-camera I'm optimistic that someone will come up
> >with patches soon.
> >
> >Sascha
> >
> Thank you.
> Best regards,
> Ga?tan Carlier.
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-10 8:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 11:06 [PATCH v2] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA Gaëtan Carlier
2012-09-11 9:47 ` Sascha Hauer
2012-09-11 11:13 ` javier Martin
2012-09-11 11:17 ` Sascha Hauer
2012-10-09 13:01 ` Gaëtan Carlier
2012-10-10 8:34 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).