Skip to content
Snippets Groups Projects
Commit 654ea1f3 authored by Dave Liu's avatar Dave Liu Committed by Kumar Gala
Browse files

ppc/85xx: Make L2 support more robust


According the user manual, we need loop-check the L2 enable bit set.

Signed-off-by: default avatarDave Liu <daveliu@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 613ad28c
No related branches found
No related tags found
No related merge requests found
......@@ -360,8 +360,11 @@ int cpu_init_r(void)
/* enable the cache */
mtspr(SPRN_L2CSR0, CONFIG_SYS_INIT_L2CSR0);
if (CONFIG_SYS_INIT_L2CSR0 & L2CSR0_L2E)
if (CONFIG_SYS_INIT_L2CSR0 & L2CSR0_L2E) {
while (!(mfspr(SPRN_L2CSR0) & L2CSR0_L2E))
;
printf("%d KB enabled\n", (l2cfg0 & 0x3fff) * 64);
}
#else
puts("disabled\n");
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment