Skip to content

Commit

Permalink
omap4: l2x0: Override the default l2x0_disable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Shilimkar committed Oct 26, 2010
1 parent 2fd8658 commit 4e803c4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/arm/mach-omap2/omap4-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
/*
Expand All @@ -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);
Expand Down

0 comments on commit 4e803c4

Please sign in to comment.