diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-07-31 12:10:10 -0400 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-10-26 02:10:00 -0400 |
commit | 4e803c40b33822b52389952040f490e79973e94a (patch) | |
tree | 389ec7520f58b7ac136fb6853efbe3ff997740d5 /arch | |
parent | 2fd8658931193599c867fd6974fa184ec34af16c (diff) |
omap4: l2x0: Override the default l2x0_disable
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>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 13dc9794dcc2..b557cc2c4b10 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) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | #ifdef CONFIG_CACHE_L2X0 | 46 | #ifdef CONFIG_CACHE_L2X0 |
47 | |||
48 | static void omap4_l2x0_disable(void) | ||
49 | { | ||
50 | /* Disable PL310 L2 Cache controller */ | ||
51 | omap_smc1(0x102, 0x0); | ||
52 | } | ||
53 | |||
47 | static int __init omap_l2_cache_init(void) | 54 | static int __init omap_l2_cache_init(void) |
48 | { | 55 | { |
49 | /* | 56 | /* |
@@ -66,6 +73,12 @@ static int __init omap_l2_cache_init(void) | |||
66 | */ | 73 | */ |
67 | l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff); | 74 | l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff); |
68 | 75 | ||
76 | /* | ||
77 | * Override default outer_cache.disable with a OMAP4 | ||
78 | * specific one | ||
79 | */ | ||
80 | outer_cache.disable = omap4_l2x0_disable; | ||
81 | |||
69 | return 0; | 82 | return 0; |
70 | } | 83 | } |
71 | early_initcall(omap_l2_cache_init); | 84 | early_initcall(omap_l2_cache_init); |