diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-15 10:29:06 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-15 10:29:06 +0100 |
commit | 709334c87dbdb44150ce436b3d13c814db0dcae9 (patch) | |
tree | 5861a45f70c1f283720337abd864498f5afb3dbe /arch/arm/mm/cache-l2x0.c | |
parent | 0d64b568fcd48b133721c1d322e7c51d85eb12df (diff) | |
parent | f74890277a196949e4004fe2955e1d4fb3930f98 (diff) | |
download | kernel-crypto-709334c87dbdb44150ce436b3d13c814db0dcae9.tar.gz kernel-crypto-709334c87dbdb44150ce436b3d13c814db0dcae9.tar.xz kernel-crypto-709334c87dbdb44150ce436b3d13c814db0dcae9.zip |
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-linus
Diffstat (limited to 'arch/arm/mm/cache-l2x0.c')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index b480f1d3591..747f9a9021b 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -99,18 +99,25 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) l2x0_base = base; - /* disable L2X0 */ - writel(0, l2x0_base + L2X0_CTRL); + /* + * Check if l2x0 controller is already enabled. + * If you are booting from non-secure mode + * accessing the below registers will fault. + */ + if (!(readl(l2x0_base + L2X0_CTRL) & 1)) { - aux = readl(l2x0_base + L2X0_AUX_CTRL); - aux &= aux_mask; - aux |= aux_val; - writel(aux, l2x0_base + L2X0_AUX_CTRL); + /* l2x0 controller is disabled */ - l2x0_inv_all(); + aux = readl(l2x0_base + L2X0_AUX_CTRL); + aux &= aux_mask; + aux |= aux_val; + writel(aux, l2x0_base + L2X0_AUX_CTRL); - /* enable L2X0 */ - writel(1, l2x0_base + L2X0_CTRL); + l2x0_inv_all(); + + /* enable L2X0 */ + writel(1, l2x0_base + L2X0_CTRL); + } outer_cache.inv_range = l2x0_inv_range; outer_cache.clean_range = l2x0_clean_range; |