diff options
author | Hai Pham <hai.pham.ud@renesas.com> | 2023-02-28 00:02:18 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-03-18 11:59:45 +0100 |
commit | 72eb1f5e19320ea4919f62341ce077a521d9c278 (patch) | |
tree | 28582ee7db9ae50947db099876aa42124998ba1a /board/renesas | |
parent | 143bd4e31536e4aee2902925224eef27fdee0167 (diff) | |
download | u-boot-72eb1f5e19320ea4919f62341ce077a521d9c278.tar.gz |
ARM: renesas: falcon: Initialize ARM generic timer and GICv3 if EL3
U-Boot executes at EL3 is required to initalize those settings.
In other cases, they will be done by prior-stage firmware instead.
This fixes crash when U-Boot is at non-secure exception level.
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'board/renesas')
-rw-r--r-- | board/renesas/falcon/falcon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/renesas/falcon/falcon.c b/board/renesas/falcon/falcon.c index b0cb4e747b..b7e7fd9003 100644 --- a/board/renesas/falcon/falcon.c +++ b/board/renesas/falcon/falcon.c @@ -14,6 +14,7 @@ #include <asm/mach-types.h> #include <asm/processor.h> #include <linux/errno.h> +#include <asm/system.h> DECLARE_GLOBAL_DATA_PTR; @@ -69,7 +70,8 @@ static void init_gic_v3(void) void s_init(void) { - init_generic_timer(); + if (current_el() == 3) + init_generic_timer(); } int board_early_init_f(void) @@ -86,7 +88,8 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_TEXT_BASE + 0x50000; - init_gic_v3(); + if (current_el() == 3) + init_gic_v3(); return 0; } |