From patchwork Mon Apr 27 10:52:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 238651 List-Id: U-Boot discussion From: rayagonda.kokatanur at broadcom.com (Rayagonda Kokatanur) Date: Mon, 27 Apr 2020 16:22:07 +0530 Subject: [PATCH v1 49/49] board: ns3: check chimp handshake status In-Reply-To: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> References: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> Message-ID: <20200427105207.5659-50-rayagonda.kokatanur@broadcom.com> Add support to check chimp handshake status. Signed-off-by: Rayagonda Kokatanur --- board/broadcom/bcmns3/ns3.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index e8f1d1b199..791baa904e 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -240,10 +241,21 @@ static int start_wdt(void) int ft_board_setup(void *fdt, bd_t *bd) { - gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS); + u32 chimp_hs; + gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS); mem_info_parse_fixup(fdt); + /* + * check for chimp handshake status. 0 timeout value will actually + * fall to default timeout value + */ + chimp_handshake_status_optee(0, &chimp_hs); + if (chimp_hs == CHIMP_HANDSHAKE_SUCCESS) + printf("ChiMP Handshake successful\n"); + else + printf("ERROR: ChiMP Handshake status 0x%x\n", chimp_hs); + start_wdt(); return 0;