From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kumar Gala Date: Mon, 26 Oct 2009 21:25:25 -0500 Subject: [U-Boot] [PATCH] ppc/85xx: Make L2 support more robust Message-ID: <1256610325-12331-1-git-send-email-galak@kernel.crashing.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Dave Liu According the user manual, we need loop-check the L2 enable bit set. Signed-off-by: Dave Liu Signed-off-by: Kumar Gala --- cpu/mpc85xx/cpu_init.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c index 5336934..0041a60 100644 --- a/cpu/mpc85xx/cpu_init.c +++ b/cpu/mpc85xx/cpu_init.c @@ -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 -- 1.6.0.6