diff options
author | Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> | 2020-07-15 22:49:00 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-29 10:13:41 -0400 |
commit | b5a152e7ca0b2b71300c1ef7a4c80a1f729a7d05 (patch) | |
tree | 87d26671579c32042a779203e5d6108ac71de545 | |
parent | ef7192e4043d7724f0d063072092e00150fb1f5e (diff) | |
download | u-boot-b5a152e7ca0b2b71300c1ef7a4c80a1f729a7d05.tar.gz u-boot-b5a152e7ca0b2b71300c1ef7a4c80a1f729a7d05.tar.bz2 u-boot-b5a152e7ca0b2b71300c1ef7a4c80a1f729a7d05.zip |
board: ns3: default reset type to L3
Default "reset" from U-Boot to L3 reset.
"reset" command with argument will trigger L1 reset.
Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | board/broadcom/bcmns3/ns3.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index e51263f85e..6a72e28494 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -10,6 +10,9 @@ #include <asm/armv8/mmu.h> #include <asm/arch-bcmns3/bl33_info.h> +/* Default reset-level = 3 and strap-val = 0 */ +#define L3_RESET 30 + static struct mm_region ns3_mem_map[] = { { .virt = 0x0UL, @@ -68,7 +71,23 @@ int dram_init_banksize(void) return 0; } -void reset_cpu(ulong addr) +void reset_cpu(ulong level) { - psci_system_reset(); + u32 reset_level, strap_val; + + /* Default reset type is L3 reset */ + if (!level) { + /* + * Encoding: U-Boot reset command expects decimal argument, + * Boot strap val: Bits[3:0] + * reset level: Bits[7:4] + */ + strap_val = L3_RESET % 10; + level = L3_RESET / 10; + reset_level = level % 10; + psci_system_reset2(reset_level, strap_val); + } else { + /* U-Boot cmd "reset" with any arg will trigger L1 reset */ + psci_system_reset(); + } } |