diff mbox

[U-Boot,1/4] ARM: tegra: remove wrong dependency on SPL_BUILD

Message ID 1472540191-18245-2-git-send-email-yamada.masahiro@socionext.com
State Superseded
Headers show

Commit Message

Masahiro Yamada Aug. 30, 2016, 6:56 a.m. UTC
SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-tegra/tegra124/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stephen Warren Aug. 30, 2016, 4:25 p.m. UTC | #1
On 08/30/2016 12:56 AM, Masahiro Yamada wrote:
> SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true.

> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig

>  config TARGET_JETSON_TK1
>  	bool "NVIDIA Tegra124 Jetson TK1 board"
> -	select CPU_V7_HAS_NONSEC if !SPL_BUILD
> -	select CPU_V7_HAS_VIRT if !SPL_BUILD
> +	select CPU_V7_HAS_NONSEC
> +	select CPU_V7_HAS_VIRT

Shouldn't this dependency be replaced with the correct dependency, 
rather than simply removed? I'm fairly sure those options should not be 
defined for SPL.
Masahiro Yamada Aug. 30, 2016, 7:13 p.m. UTC | #2
2016-08-31 1:25 GMT+09:00 Stephen Warren <swarren@wwwdotorg.org>:
> On 08/30/2016 12:56 AM, Masahiro Yamada wrote:
>>
>> SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true.
>
>
>> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig
>> b/arch/arm/mach-tegra/tegra124/Kconfig
>
>
>>  config TARGET_JETSON_TK1
>>         bool "NVIDIA Tegra124 Jetson TK1 board"
>> -       select CPU_V7_HAS_NONSEC if !SPL_BUILD
>> -       select CPU_V7_HAS_VIRT if !SPL_BUILD
>> +       select CPU_V7_HAS_NONSEC
>> +       select CPU_V7_HAS_VIRT
>
>
> Shouldn't this dependency be replaced with the correct dependency, rather
> than simply removed? I'm fairly sure those options should not be defined for
> SPL.
>

These lines were added by Ian.
I was not sure if he meant "!SPL" here.

SPL is select'ed by TEGRA_ARMV7_COMMON,
so it is not configurable.

config TEGRA_ARMV7_COMMON
        bool "Tegra 32-bit common options"
        select CPU_V7
        select SPL
        select SUPPORT_SPL
        select TEGRA_COMMON
        select TEGRA_GPIO
Stephen Warren Aug. 30, 2016, 7:43 p.m. UTC | #3
On 08/30/2016 01:13 PM, Masahiro Yamada wrote:
> 2016-08-31 1:25 GMT+09:00 Stephen Warren <swarren@wwwdotorg.org>:
>> On 08/30/2016 12:56 AM, Masahiro Yamada wrote:
>>>
>>> SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true.
>>
>>
>>> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig
>>> b/arch/arm/mach-tegra/tegra124/Kconfig
>>
>>
>>>  config TARGET_JETSON_TK1
>>>         bool "NVIDIA Tegra124 Jetson TK1 board"
>>> -       select CPU_V7_HAS_NONSEC if !SPL_BUILD
>>> -       select CPU_V7_HAS_VIRT if !SPL_BUILD
>>> +       select CPU_V7_HAS_NONSEC
>>> +       select CPU_V7_HAS_VIRT
>>
>>
>> Shouldn't this dependency be replaced with the correct dependency, rather
>> than simply removed? I'm fairly sure those options should not be defined for
>> SPL.
>>
>
> These lines were added by Ian.
> I was not sure if he meant "!SPL" here.
>
> SPL is select'ed by TEGRA_ARMV7_COMMON,
> so it is not configurable.
>
> config TEGRA_ARMV7_COMMON
>         bool "Tegra 32-bit common options"
>         select CPU_V7
>         select SPL

CONFIG_SPL (selected immediately above) means the configuration has a 
separate SPL and "main" build. CONFIG_SPL_BUILD (in the patch quoted 
further above) means the code is currently being compiled for SPL.
Masahiro Yamada Aug. 30, 2016, 8:21 p.m. UTC | #4
2016-08-31 4:43 GMT+09:00 Stephen Warren <swarren@wwwdotorg.org>:
> On 08/30/2016 01:13 PM, Masahiro Yamada wrote:
>>
>> 2016-08-31 1:25 GMT+09:00 Stephen Warren <swarren@wwwdotorg.org>:
>>>
>>> On 08/30/2016 12:56 AM, Masahiro Yamada wrote:
>>>>
>>>>
>>>> SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true.
>>>
>>>
>>>
>>>> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig
>>>> b/arch/arm/mach-tegra/tegra124/Kconfig
>>>
>>>
>>>
>>>>  config TARGET_JETSON_TK1
>>>>         bool "NVIDIA Tegra124 Jetson TK1 board"
>>>> -       select CPU_V7_HAS_NONSEC if !SPL_BUILD
>>>> -       select CPU_V7_HAS_VIRT if !SPL_BUILD
>>>> +       select CPU_V7_HAS_NONSEC
>>>> +       select CPU_V7_HAS_VIRT
>>>
>>>
>>>
>>> Shouldn't this dependency be replaced with the correct dependency, rather
>>> than simply removed? I'm fairly sure those options should not be defined
>>> for
>>> SPL.
>>>
>>
>> These lines were added by Ian.
>> I was not sure if he meant "!SPL" here.
>>
>> SPL is select'ed by TEGRA_ARMV7_COMMON,
>> so it is not configurable.
>>
>> config TEGRA_ARMV7_COMMON
>>         bool "Tegra 32-bit common options"
>>         select CPU_V7
>>         select SPL
>
>
> CONFIG_SPL (selected immediately above) means the configuration has a
> separate SPL and "main" build. CONFIG_SPL_BUILD (in the patch quoted further
> above) means the code is currently being compiled for SPL.
>

I know this.
(CONFIG_SPL_BUILD is not a config option in the first place.
Its CONFIG_ prefix is misleading.)



You mentioned to replace "if !SPL_BUILD" rather than delete.

Then, I thought you were suggesting to fix

config TARGET_JETSON_TK1
       bool "NVIDIA Tegra124 Jetson TK1 board"
       select CPU_V7_HAS_NONSEC if !SPL_BUILD
       select CPU_V7_HAS_VIRT if !SPL_BUILD

to

config TARGET_JETSON_TK1
       bool "NVIDIA Tegra124 Jetson TK1 board"
       select CPU_V7_HAS_NONSEC if !SPL
       select CPU_V7_HAS_VIRT if !SPL

in case Ian maybe misunderstood the difference between SPL and SPL_BUILD.
Even if so, SPL can not be disabled for Tegra.

So, I could not find a replacement.
If you have an idea, please let me know.


I hope Ian can comment on this.
I could not figure out his intention.
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig
index f3324ff..44f63f7 100644
--- a/arch/arm/mach-tegra/tegra124/Kconfig
+++ b/arch/arm/mach-tegra/tegra124/Kconfig
@@ -6,8 +6,8 @@  choice
 
 config TARGET_JETSON_TK1
 	bool "NVIDIA Tegra124 Jetson TK1 board"
-	select CPU_V7_HAS_NONSEC if !SPL_BUILD
-	select CPU_V7_HAS_VIRT if !SPL_BUILD
+	select CPU_V7_HAS_NONSEC
+	select CPU_V7_HAS_VIRT
 
 config TARGET_NYAN_BIG
 	bool "Google/NVIDIA Nyan-big Chromebook"