cmd: broadcom: add bnxt boot command
[platform/kernel/u-boot.git] / include / broadcom / chimp.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2020 Broadcom.
4  *
5  */
6
7 #ifndef __CHIMP_H__
8 #define __CHIMP_H__
9
10 #include <linux/compiler.h>
11
12 /*
13  * Chimp binary has health status like initialization complete,
14  * crash or running fine
15  */
16 #define BCM_CHIMP_RUNNIG_GOOD   0x8000
17
18 /**
19  * chimp_fastboot_optee() - api to load bnxt firmware
20  *
21  * @return: 0 on success and -ve on failure
22  */
23 int chimp_fastboot_optee(void);
24
25 /**
26  * chimp_health_status_optee() - get chimp health status
27  *
28  * Chimp health status could be firmware is in good condition or
29  * bad condition because of crash/hang.
30  *
31  * @status: pointer to get chimp health status
32  *
33  * @return: 0 on success and -ve on failure
34  */
35 int chimp_health_status_optee(u32 *status);
36
37 /**
38  * chimp_handshake_status_optee() - get chimp handshake status.
39  *
40  * To know firmware is loaded and running.
41  *
42  * @timeout: timeout value, if 0 then default timeout is considered by op-tee
43  * @hstatus: pointer to chimp handshake status
44  *
45  * @return: 0 on success and -ve on failure
46  */
47 int chimp_handshake_status_optee(u32 timeout, u32 *hstatus);
48
49 #endif