1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2020 Broadcom
8 #include <broadcom/chimp.h>
10 static int do_chimp_fastboot_secure(struct cmd_tbl *cmdtp, int flag, int argc,
15 if (chimp_health_status_optee(&health)) {
16 pr_err("Chimp health command fail\n");
17 return CMD_RET_FAILURE;
20 if (health == BCM_CHIMP_RUNNIG_GOOD) {
21 printf("skip fastboot...\n");
22 return CMD_RET_SUCCESS;
25 if (chimp_fastboot_optee()) {
26 pr_err("Failed to load secure ChiMP image\n");
27 return CMD_RET_FAILURE;
30 return CMD_RET_SUCCESS;
34 (chimp_ld_secure, 1, 0, do_chimp_fastboot_secure,
35 "Invoke chimp fw load via optee",