mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
cmd: broadcom: add command for chimp handshake
Add command for chimp handshake. Handshake is used to know chimp is loaded and booted successfully. 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>
This commit is contained in:
parent
70bf26332f
commit
a09ca687e7
3 changed files with 40 additions and 0 deletions
33
cmd/broadcom/chimp_handshake.c
Normal file
33
cmd/broadcom/chimp_handshake.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2020 Broadcom
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <broadcom/chimp.h>
|
||||
|
||||
/* This command should be called after loading the nitro binaries */
|
||||
static int do_chimp_hs(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
int ret = CMD_RET_USAGE;
|
||||
u32 hstatus;
|
||||
|
||||
/* Returns 1, if handshake call is success */
|
||||
if (chimp_handshake_status_optee(0, &hstatus))
|
||||
ret = CMD_RET_SUCCESS;
|
||||
|
||||
if (hstatus == CHIMP_HANDSHAKE_SUCCESS)
|
||||
printf("ChiMP Handshake successful\n");
|
||||
else
|
||||
printf("ERROR: ChiMP Handshake status 0x%x\n", hstatus);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
U_BOOT_CMD
|
||||
(chimp_hs, 1, 1, do_chimp_hs,
|
||||
"Verify the Chimp handshake",
|
||||
"chimp_hs\n"
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue