blob: 7f641529139a81561f8a09dfec1cc311fd643548 [file] [log] [blame]
Vikas Gupta1ac6f4b2020-07-15 22:57:19 +05301/* 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_fastboot_optee() - api to load bnxt firmware
14 *
15 * @return: 0 on success and -ve on failure
16 */
17int chimp_fastboot_optee(void);
18
19/**
20 * chimp_health_status_optee() - get chimp health status
21 *
22 * Chimp health status could be firmware is in good condition or
23 * bad condition because of crash/hang.
24 *
25 * @status: pointer to get chimp health status
26 *
27 * @return: 0 on success and -ve on failure
28 */
29int chimp_health_status_optee(u32 *status);
30
31/**
32 * chimp_handshake_status_optee() - get chimp handshake status.
33 *
34 * To know firmware is loaded and running.
35 *
36 * @timeout: timeout value, if 0 then default timeout is considered by op-tee
37 * @hstatus: pointer to chimp handshake status
38 *
39 * @return: 0 on success and -ve on failure
40 */
41int chimp_handshake_status_optee(u32 timeout, u32 *hstatus);
42
43#endif