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 <cedric.neveux@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
(cherry picked from commit 5133fbe9aaafd24add7d92b1aa2d3474b7a13723)
This commit is contained in:
Cedric Neveux 2017-11-14 16:42:42 +00:00 committed by Clement Faure
parent 3a8cbd11a0
commit 7726883a22
1 changed files with 5 additions and 0 deletions

View File

@ -867,6 +867,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;