[U-Boot] [PATCH] powerpc/mpc85xx:Disable Debug TLB entry for non-minimal SPL

Scott Wood scottwood at freescale.com
Fri Jun 28 18:19:25 CEST 2013


On 06/28/2013 04:05:43 AM, Prabhakar Kushwaha wrote:
> On 06/27/2013 12:36 AM, Scott Wood wrote:
>> On 06/25/2013 11:09:04 PM, Prabhakar Kushwaha wrote:
>>> 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.

How so?

> 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 :)

That's equivalent to what I suggested in the above link.  You just  
replaced !(x && y) with (!x || !y).

Or relative to your original suggestion above, you replaced !(x || (y  
&& z)) with !x && (!y || !z).

They're all logically equivalent[1].  The question is just which one is  
most readable/intuitive.

-Scott

[1] http://en.wikipedia.org/wiki/De_Morgan%27s_laws


More information about the U-Boot mailing list