ARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions

CONFIG_ARMV7_VIRT depends on CONFIG_ARMV7_NONSEC, 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.

CC: Tang Yuantian <Yuantian.Tang@freescale.com>
CC: York Sun <yorksun@freescale.com>
CC: Steve Rae <srae@broadcom.com>
CC: Andre Przywara <andre.przywara@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Alison Wang <alison.wang@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
master
Jan Kiszka 9 years ago committed by Tom Warren
parent 86bd20b007
commit 104d6fb6cd
  1. 2
      arch/arm/cpu/armv7/Makefile
  2. 2
      arch/arm/cpu/armv7/ls102xa/cpu.c
  3. 2
      arch/arm/cpu/armv7/virt-dt.c
  4. 2
      arch/arm/cpu/u-boot.lds
  5. 4
      arch/arm/include/asm/armv7.h
  6. 2
      arch/arm/lib/bootm-fdt.c
  7. 6
      arch/arm/lib/bootm.c
  8. 2
      board/armltd/vexpress/vexpress_common.c
  9. 2
      board/broadcom/bcm_ep/board.c
  10. 2
      board/freescale/common/arm_sleep.c

@ -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

@ -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)
{

@ -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
if (!armv7_boot_nonsec())
return 0;
#endif

@ -25,7 +25,7 @@ SECTIONS
*(.text*)
}
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) || defined(CONFIG_ARMV7_PSCI)
#ifdef CONFIG_ARMV7_NONSEC
#ifndef CONFIG_ARMV7_SECURE_BASE
#define CONFIG_ARMV7_SECURE_BASE

@ -131,7 +131,7 @@ void v7_outer_cache_inval_all(void);
void v7_outer_cache_flush_range(u32 start, u32 end);
void v7_outer_cache_inval_range(u32 start, u32 end);
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
int armv7_init_nonsec(void);
bool armv7_boot_nonsec(void);
@ -145,7 +145,7 @@ void _smp_pen(void);
extern char __secure_start[];
extern char __secure_end[];
#endif /* CONFIG_ARMV7_NONSEC || CONFIG_ARMV7_VIRT */
#endif /* CONFIG_ARMV7_NONSEC */
void v7_arch_cp15_set_l2aux_ctrl(u32 l2auxctrl, u32 cpu_midr,
u32 cpu_rev_comb, u32 cpu_variant,

@ -34,7 +34,7 @@ int arch_fixup_fdt(void *blob)
}
ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
if (ret)
return ret;

@ -26,7 +26,7 @@
#include <bootm.h>
#include <vxworks.h>
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
#include <asm/armv7.h>
#endif
@ -238,7 +238,7 @@ static void boot_prep_linux(bootm_headers_t *images)
}
}
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
bool armv7_boot_nonsec(void)
{
char *s = getenv("bootm_boot_mode");
@ -305,7 +305,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
r2 = gd->bd->bi_boot_params;
if (!fake) {
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
if (armv7_boot_nonsec()) {
armv7_init_nonsec();
secure_ram_addr(_do_nonsec_entry)(kernel_entry,

@ -181,7 +181,7 @@ ulong get_board_rev(void){
return readl((u32 *)SYS_ID);
}
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
/* Setting the address at which secondary cores start from.
* Versatile Express uses one address for all cores, so ignore corenr
*/

@ -54,7 +54,7 @@ int board_early_init_f(void)
return status;
}
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
#ifdef CONFIG_ARMV7_NONSEC
void smp_set_core_boot_addr(unsigned long addr, int corenr)
{
}

@ -6,7 +6,7 @@
#include <common.h>
#include <asm/io.h>
#if !defined(CONFIG_ARMV7_NONSEC) || !defined(CONFIG_ARMV7_VIRT)
#ifndef CONFIG_ARMV7_NONSEC
#error " Deep sleep needs non-secure mode support. "
#else
#include <asm/secure.h>

Loading…
Cancel
Save