Patchwork [U-Boot,v2] powerpc/mpc85xx:Disable Debug TLB entry before init_tlbs

login
register
mail settings
Submitter Prabhakar Kushwaha
Date June 13, 2013, 4:44 a.m.
Message ID <1371098640-9244-1-git-send-email-prabhakar@freescale.com>
Download mbox | patch
Permalink /patch/250978/
State Accepted
Delegated to: Andy Fleming
Headers show

Comments

Prabhakar Kushwaha - June 13, 2013, 4:44 a.m.
init_tlbs() initialize all the TLB entries required for the system.

So disable DEBUG TLB entry before TLB entries initialization.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 changes for v2: Fixed checkpatch warning.

 arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    4 ++++
 1 file changed, 4 insertions(+)
Andy Fleming - June 21, 2013, 8:38 p.m.
On Thu, Jun 13, 2013 at 10:14:00AM +0530, Prabhakar Kushwaha wrote:
> init_tlbs() initialize all the TLB entries required for the system.
> 
> So disable DEBUG TLB entry before TLB entries initialization.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>

Applied, with fixes.

> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> index f4403c2..340b063 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> @@ -180,5 +180,9 @@ void cpu_init_early_f(void)
>  
>  	invalidate_tlb(1);
>  
> +#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && !defined(CONFIG_SPL_BUILD)
> +	disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB);
> +#endif

Had to add CONFIG_NAND_SPL here, as well, just for future reference

Patch

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index f4403c2..340b063 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -180,5 +180,9 @@  void cpu_init_early_f(void)
 
 	invalidate_tlb(1);
 
+#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && !defined(CONFIG_SPL_BUILD)
+	disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB);
+#endif
+
 	init_tlbs();
 }