From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prabhakar Kushwaha Date: Fri, 28 Jun 2013 14:35:43 +0530 Subject: [U-Boot] [PATCH] powerpc/mpc85xx:Disable Debug TLB entry for non-minimal SPL In-Reply-To: <1372273585.8183.34@snotra> References: <1372273585.8183.34@snotra> Message-ID: <51CD51E7.5090306@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/27/2013 12:36 AM, Scott Wood wrote: > On 06/25/2013 11:09:04 PM, Prabhakar Kushwaha wrote: >> On 06/25/2013 08:38 PM, Scott Wood wrote: >>> On 06/25/2013 12:03:56 AM, Prabhakar Kushwaha wrote: >>>> CONFIG_SPL_BUILD creates debug TLB entry, so disable it before >>>> init_tlbs. >>>> >>>> CONFIG_SPL_INIT_MINIMAL never creates any debug TLB entry, so no need >>>> of disable_tlb(). >>>> >>>> Signed-off-by: Prabhakar Kushwaha >>>> --- >>>> arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c >>>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c >>>> index 837c034..0cb2717 100644 >>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c >>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c >>>> @@ -180,7 +180,8 @@ void cpu_init_early_f(void) >>>> >>>> invalidate_tlb(1); >>>> >>>> -#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && >>>> !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NAND_SPL) >>>> +#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && \ >>>> + !defined(CONFIG_SPL_INIT_MINIMAL) && >>>> !defined(CONFIG_NAND_SPL) >>>> disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB); >>>> #endif >>> >>> This fails to clear the debug TLB in non-SPL_BUILD portion of a >>> build that has CONFIG_SPL_INIT_MINIMAL setoh.. >> oh.. lots of cases :( >> >> then it should be like this. slightly complex. >> #if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && >> !(defined(CONFIG_NAND_SPL) || \ >> (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL))) >> >> or >> #if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && (CONFIG_SYS_RAMBOOT) || \ >> (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_INIT_MINIMAL))) > > The former: > > http://lists.denx.de/pipermail/u-boot/2013-June/157201.html > The defines mentioned at this link and earlier written by me will not work as they are not taking care of SD boot and NOR boot scenario. Below define will take care of all possible combination - NOR , SD, SPI boot - NAND_SPL - SPL with SPL_INIT_MINIMAL - SPL without SPL_INIT_MINIMAL #if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && !defined(CONFIG_NAND_SPL) && \ (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL)) Took lot of time to figure out :) Regards, Prabhakar