Patchwork [1/2] ARM: i.MX27: Add platform support for IRAM.

login
register
mail settings
Submitter Javier Martin
Date Nov. 5, 2012, 3:59 p.m.
Message ID <1352131185-12079-1-git-send-email-javier.martin@vista-silicon.com>
Download mbox | patch
Permalink /patch/197211/
State New
Headers show

Comments

Javier Martin - Nov. 5, 2012, 3:59 p.m.
Add support for IRAM to i.MX27 non-DT platforms using
iram_init() function.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
---
 arch/arm/mach-imx/mm-imx27.c |    3 +++
 1 file changed, 3 insertions(+)
Guennadi Liakhovetski - Nov. 6, 2012, 11:37 a.m.
Hi Javier

On Mon, 5 Nov 2012, Javier Martin wrote:

> Add support for IRAM to i.MX27 non-DT platforms using
> iram_init() function.

I'm not sure this belongs in a camera driver. Can IRAM not be used for 
anything else? I'll check the i.MX27 datasheet when I'm back home after 
the conference, so far this seems a bit odd.

Thanks
Guennadi

> 
> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
> ---
>  arch/arm/mach-imx/mm-imx27.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
> index e7e24af..fd2416d 100644
> --- a/arch/arm/mach-imx/mm-imx27.c
> +++ b/arch/arm/mach-imx/mm-imx27.c
> @@ -27,6 +27,7 @@
>  #include <asm/pgtable.h>
>  #include <asm/mach/map.h>
>  #include <mach/iomux-v1.h>
> +#include <mach/iram.h>
>  
>  /* MX27 memory map definition */
>  static struct map_desc imx27_io_desc[] __initdata = {
> @@ -94,4 +95,6 @@ void __init imx27_soc_init(void)
>  	/* imx27 has the imx21 type audmux */
>  	platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
>  					ARRAY_SIZE(imx27_audmux_res));
> +	/* imx27 has an iram of 46080 bytes size */
> +	iram_init(MX27_IRAM_BASE_ADDR, 46080);
>  }
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Sascha Hauer - Nov. 6, 2012, 12:41 p.m.
On Tue, Nov 06, 2012 at 12:37:35PM +0100, Guennadi Liakhovetski wrote:
> Hi Javier
> 
> On Mon, 5 Nov 2012, Javier Martin wrote:
> 
> > Add support for IRAM to i.MX27 non-DT platforms using
> > iram_init() function.
> 
> I'm not sure this belongs in a camera driver. Can IRAM not be used for 
> anything else? I'll check the i.MX27 datasheet when I'm back home after 
> the conference, so far this seems a bit odd.

This patch just adds the sram pool to the system in i.MX27 code, the
patch is not camera specific.

Sascha
Sascha Hauer - Nov. 16, 2012, 12:48 p.m.
On Mon, Nov 05, 2012 at 04:59:44PM +0100, Javier Martin wrote:
> Add support for IRAM to i.MX27 non-DT platforms using
> iram_init() function.
> 
> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
> ---
>  arch/arm/mach-imx/mm-imx27.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
> index e7e24af..fd2416d 100644
> --- a/arch/arm/mach-imx/mm-imx27.c
> +++ b/arch/arm/mach-imx/mm-imx27.c
> @@ -27,6 +27,7 @@
>  #include <asm/pgtable.h>
>  #include <asm/mach/map.h>
>  #include <mach/iomux-v1.h>
> +#include <mach/iram.h>
>  
>  /* MX27 memory map definition */
>  static struct map_desc imx27_io_desc[] __initdata = {
> @@ -94,4 +95,6 @@ void __init imx27_soc_init(void)
>  	/* imx27 has the imx21 type audmux */
>  	platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
>  					ARRAY_SIZE(imx27_audmux_res));
> +	/* imx27 has an iram of 46080 bytes size */
> +	iram_init(MX27_IRAM_BASE_ADDR, 46080);

For this rather Philipps sram allocater patches should be used. This
would also solve the problem that mach/iram.h cannot be accessed anymore
in current -next. Fabio already sent a patch addressing this, but I
think we should go for a proper fix rather than just moving iram.h
to include/linux/

Sascha
Javier Martin - Nov. 22, 2012, 8:23 a.m.
On 16 November 2012 13:48, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Nov 05, 2012 at 04:59:44PM +0100, Javier Martin wrote:
>> Add support for IRAM to i.MX27 non-DT platforms using
>> iram_init() function.
>>
>> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
>> ---
>>  arch/arm/mach-imx/mm-imx27.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
>> index e7e24af..fd2416d 100644
>> --- a/arch/arm/mach-imx/mm-imx27.c
>> +++ b/arch/arm/mach-imx/mm-imx27.c
>> @@ -27,6 +27,7 @@
>>  #include <asm/pgtable.h>
>>  #include <asm/mach/map.h>
>>  #include <mach/iomux-v1.h>
>> +#include <mach/iram.h>
>>
>>  /* MX27 memory map definition */
>>  static struct map_desc imx27_io_desc[] __initdata = {
>> @@ -94,4 +95,6 @@ void __init imx27_soc_init(void)
>>       /* imx27 has the imx21 type audmux */
>>       platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
>>                                       ARRAY_SIZE(imx27_audmux_res));
>> +     /* imx27 has an iram of 46080 bytes size */
>> +     iram_init(MX27_IRAM_BASE_ADDR, 46080);
>
> For this rather Philipps sram allocater patches should be used. This
> would also solve the problem that mach/iram.h cannot be accessed anymore
> in current -next. Fabio already sent a patch addressing this, but I
> think we should go for a proper fix rather than just moving iram.h
> to include/linux/

Fine, I'll take a look at Philipps' patches.

Regards.

Patch

diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
index e7e24af..fd2416d 100644
--- a/arch/arm/mach-imx/mm-imx27.c
+++ b/arch/arm/mach-imx/mm-imx27.c
@@ -27,6 +27,7 @@ 
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
 #include <mach/iomux-v1.h>
+#include <mach/iram.h>
 
 /* MX27 memory map definition */
 static struct map_desc imx27_io_desc[] __initdata = {
@@ -94,4 +95,6 @@  void __init imx27_soc_init(void)
 	/* imx27 has the imx21 type audmux */
 	platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
 					ARRAY_SIZE(imx27_audmux_res));
+	/* imx27 has an iram of 46080 bytes size */
+	iram_init(MX27_IRAM_BASE_ADDR, 46080);
 }