From 7d44969583a19d106ce6d0d4cfd8e6b67a53091e Mon Sep 17 00:00:00 2001 From: Cedric Neveux Date: Tue, 14 Nov 2017 16:42:42 +0000 Subject: [PATCH] MLK-16912 PL310: unlock ways during initialization This change affects all i.MX 6 with PL310 L2 Cache controller. When Linux runs in Non-secure World the PL310 has already been initialized by the ARM secure World running OP-TEE os. However, in order to have a proper Linux Initialization all the L2 cache ways have been locked by the secure world. This patch unlock all the ways during pl310 initialization. Signed-off-by: Cedric Neveux (cherry picked from commit be7971b62e0c77cf70f828868a5d5a4184a926d2) --- arch/arm/mm/cache-l2x0.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index d1870c777c6e..c9b12ff91a43 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -876,6 +876,11 @@ static int __init __l2c_init(const struct l2c_init_data *data, l2x0_saved_regs.aux_ctrl = aux; data->enable(l2x0_base, data->num_lock); + } else { + pr_info("%s cache controller enabled try to unlock\n", + data->type); + + data->unlock(l2x0_base, data->num_lock); } outer_cache = fns; -- 2.17.1