Re: [PATCH 3/6] omap4: l2x0: Override the default l2x0_disable

2010-09-15 Thread Tony Lindgren
* Santosh Shilimkar santosh.shilim...@ti.com [100907 00:50]:
 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

snip

 @@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void)

*/
   l2x0_init(l2cache_base, 0x0e05, 0xcfff);

 + /*
 +  * Override default outer_cache.disable with a OMAP4
 +  * specific one
 + */
 + outer_cache.disable = omap4_l2x0_disable;
 +
   return 0;
  }
  early_initcall(omap_l2_cache_init);

Just to be sure.. No outer_cache functions get set unless
l2x0_init gets called, right? So omap2 and omap3 functions
always stay NULL with omap3_defconfig?

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 3/6] omap4: l2x0: Override the default l2x0_disable

2010-09-15 Thread Shilimkar, Santosh
 -Original Message-
 From: Tony Lindgren [mailto:t...@atomide.com]
 Sent: Thursday, September 16, 2010 5:52 AM
 To: Shilimkar, Santosh
 Cc: linux-arm-ker...@lists.infradead.org; t...@linutronix.de;
 catalin.mari...@arm.com; linux-omap@vger.kernel.org
 Subject: Re: [PATCH 3/6] omap4: l2x0: Override the default l2x0_disable
 
 * Santosh Shilimkar santosh.shilim...@ti.com [100907 00:50]:
  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
 
 snip
 
  @@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void)
 
   */
  l2x0_init(l2cache_base, 0x0e05, 0xcfff);
 
  +   /*
  +* Override default outer_cache.disable with a OMAP4
  +* specific one
  +   */
  +   outer_cache.disable = omap4_l2x0_disable;
  +
  return 0;
   }
   early_initcall(omap_l2_cache_init);
 
 Just to be sure.. No outer_cache functions get set unless
 l2x0_init gets called, right? So omap2 and omap3 functions
 always stay NULL with omap3_defconfig?
 
Yes.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/6] omap4: l2x0: Override the default l2x0_disable

2010-09-07 Thread 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.shilim...@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, 0x0e05, 0xcfff);
 
+   /*
+* 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html