linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable
@ 2010-07-31 17:45 Santosh Shilimkar
  2010-08-02 12:18 ` Gadiyar, Anand
  2010-08-02 13:12 ` Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2010-07-31 17:45 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Santosh Shilimkar

The machine_kexec() calls outer_disable which can crash on OMAP4
becasue of trustzone restrictions.

This patch overrides the default l2x0_disable with a OMAP4
specific implementation taking care of trustzone

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/mach-omap2/omap4-common.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 13dc979..b557cc2 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -44,6 +44,13 @@ void __init gic_init_irq(void)
 }
 
 #ifdef CONFIG_CACHE_L2X0
+
+static void omap4_l2x0_disable(void)
+{
+	/* Disable PL310 L2 Cache controller */
+	omap_smc1(0x102, 0x0);
+}
+
 static int __init omap_l2_cache_init(void)
 {
 	/*
@@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void)
 	 */
 	l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
 
+	/*
+	 * Override default outer_cache.disable with a OMAP4
+	 * specific one
+	*/
+	outer_cache.disable = omap4_l2x0_disable;
+
 	return 0;
 }
 early_initcall(omap_l2_cache_init);
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable
  2010-07-31 17:45 [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable Santosh Shilimkar
@ 2010-08-02 12:18 ` Gadiyar, Anand
  2010-08-02 13:12 ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Gadiyar, Anand @ 2010-08-02 12:18 UTC (permalink / raw)
  To: linux-arm-kernel@lists.infradead.org
  Cc: linux-omap@vger.kernel.org, Shilimkar, Santosh

> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index 13dc979..b557cc2 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c

<snip>

> @@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void)
>  	 */
>  	l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
>  
> +	/*
> +	 * Override default outer_cache.disable with a OMAP4
> +	 * specific one
> +	*/

Minor comment - you need a space before the '*'

> +	outer_cache.disable = omap4_l2x0_disable;
> +
>  	return 0;
>  }
>  early_initcall(omap_l2_cache_init);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable
  2010-07-31 17:45 [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable Santosh Shilimkar
  2010-08-02 12:18 ` Gadiyar, Anand
@ 2010-08-02 13:12 ` Tony Lindgren
  2010-08-02 13:21   ` Shilimkar, Santosh
  1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2010-08-02 13:12 UTC (permalink / raw)
  To: Santosh Shilimkar; +Cc: linux-arm-kernel, linux-omap

* Santosh Shilimkar <santosh.shilimkar@ti.com> [100731 20:38]:
> The machine_kexec() calls outer_disable which can crash on OMAP4
> becasue of trustzone restrictions.
> 
> This patch overrides the default l2x0_disable with a OMAP4
> specific implementation taking care of trustzone

Do you need different handling on GP omaps compared to HS omaps?

Tony
 
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  arch/arm/mach-omap2/omap4-common.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index 13dc979..b557cc2 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -44,6 +44,13 @@ void __init gic_init_irq(void)
>  }
>  
>  #ifdef CONFIG_CACHE_L2X0
> +
> +static void omap4_l2x0_disable(void)
> +{
> +	/* Disable PL310 L2 Cache controller */
> +	omap_smc1(0x102, 0x0);
> +}
> +
>  static int __init omap_l2_cache_init(void)
>  {
>  	/*
> @@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void)
>  	 */
>  	l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
>  
> +	/*
> +	 * Override default outer_cache.disable with a OMAP4
> +	 * specific one
> +	*/
> +	outer_cache.disable = omap4_l2x0_disable;
> +
>  	return 0;
>  }
>  early_initcall(omap_l2_cache_init);
> -- 
> 1.6.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable
  2010-08-02 13:12 ` Tony Lindgren
@ 2010-08-02 13:21   ` Shilimkar, Santosh
  0 siblings, 0 replies; 4+ messages in thread
From: Shilimkar, Santosh @ 2010-08-02 13:21 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org

> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Monday, August 02, 2010 6:43 PM
> To: Shilimkar, Santosh
> Cc: linux-arm-kernel@lists.infradead.org; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable
> 
> * Santosh Shilimkar <santosh.shilimkar@ti.com> [100731 20:38]:
> > The machine_kexec() calls outer_disable which can crash on OMAP4
> > becasue of trustzone restrictions.
> >
> > This patch overrides the default l2x0_disable with a OMAP4
> > specific implementation taking care of trustzone
> 
> Do you need different handling on GP omaps compared to HS omaps?
> 
No. Same API works for both

Regards,
Santosh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-02 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-31 17:45 [PATCH 2/4] omap4: l2x0: Override the default l2x0_disable Santosh Shilimkar
2010-08-02 12:18 ` Gadiyar, Anand
2010-08-02 13:12 ` Tony Lindgren
2010-08-02 13:21   ` Shilimkar, Santosh

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).