[U-Boot] [PATCH v7 01/17] ARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions
Jan Kiszka
jan.kiszka at siemens.com
Wed Apr 22 16:31:47 CEST 2015
On 2015-04-22 16:03, Andre Przywara wrote:
> On Tue, 21 Apr 2015 07:18:24 +0200
> Jan Kiszka <jan.kiszka at siemens.com> wrote:
>
> Hi Jan,
>
>> CONFIG_ARMV7_VIRT depends on CONFIG_ARMV7_NONSEC,
>
> Is this Kconfig rule always enforced these days? Or can one get away
> without it by using stuff from include/configs/*.h?
I bet you can mess up a lot that way as those configs are pulled in
during build, not during configure. But I don't think we want to
replicate Kconfig rules into config header sanity checks.
Fact is that only Freescale's ls1021aqds.h and ls1021atwr.h still set
those switches in headers, but then both hardwired to "y" - do you know
why, Alison?
>
>> thus doesn't need to
>> be taken into account additionally. CONFIG_ARMV7_PSCI is only set on
>> boards that support CONFIG_ARMV7_NONSEC, and it only works on those.
>
> Shouldn't this be also modelled in Kconfig then?
>
Likely, but that should be a separate patch.
> ...
>
>> CC: Tang Yuantian <Yuantian.Tang at freescale.com>
>> CC: York Sun <yorksun at freescale.com>
>> CC: Steve Rae <srae at broadcom.com>
>> CC: Andre Przywara <andre.przywara at linaro.org>
>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
>> ---
>> arch/arm/cpu/armv7/Makefile | 2 +-
>> arch/arm/cpu/armv7/ls102xa/cpu.c | 2 +-
>> arch/arm/cpu/armv7/virt-dt.c | 2 +-
>> arch/arm/cpu/u-boot.lds | 2 +-
>> arch/arm/include/asm/armv7.h | 4 ++--
>> arch/arm/lib/bootm-fdt.c | 2 +-
>> arch/arm/lib/bootm.c | 6 +++---
>> board/armltd/vexpress/vexpress_common.c | 2 +-
>> board/broadcom/bcm_ep/board.c | 2 +-
>> board/freescale/common/arm_sleep.c | 2 +-
>> 10 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
>> index 21fc03b..fbd0bf3 100644
>> --- a/arch/arm/cpu/armv7/Makefile
>> +++ b/arch/arm/cpu/armv7/Makefile
>> @@ -18,7 +18,7 @@ obj-y += lowlevel_init.o
>> endif
>> endif
>>
>> -ifneq ($(CONFIG_ARMV7_NONSEC)$(CONFIG_ARMV7_VIRT),)
>> +ifneq ($(CONFIG_ARMV7_NONSEC),)
>> obj-y += nonsec_virt.o
>> obj-y += virt-v7.o
>> obj-y += virt-dt.o
>> diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
>> index 1a640bb..75f0d8c 100644
>> --- a/arch/arm/cpu/armv7/ls102xa/cpu.c
>> +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
>> @@ -329,7 +329,7 @@ int arch_cpu_init(void)
>> return 0;
>> }
>>
>> -#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
>> +#ifdef CONFIG_ARMV7_NONSEC
>> /* Set the address at which the secondary core starts from.*/
>> void smp_set_core_boot_addr(unsigned long addr, int corenr)
>> {
>> diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
>> index 9408e33..caaaaab 100644
>> --- a/arch/arm/cpu/armv7/virt-dt.c
>> +++ b/arch/arm/cpu/armv7/virt-dt.c
>> @@ -90,7 +90,7 @@ static int fdt_psci(void *fdt)
>>
>> int psci_update_dt(void *fdt)
>> {
>> -#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
>> +#ifdef CONFIG_ARMV7_NONSEC
>
> This is redundant now, isn't it? We compile this file only if
> CONFIG_ARMV7_NONSEC is defined (see above).
Right, even better. I'll clean up on top unless this series requires
another round.
>
> The rest of the patch looks OK to me.
>
> Cheers,
> Andre.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
More information about the U-Boot
mailing list