Commit | Line | Data |
---|---|---|
3b415c8f BA |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | ||
3 | #ifndef __QCOM_Q6V5_H__ | |
4 | #define __QCOM_Q6V5_H__ | |
5 | ||
6 | #include <linux/kernel.h> | |
7 | #include <linux/completion.h> | |
c1fe10d2 | 8 | #include <linux/soc/qcom/qcom_aoss.h> |
3b415c8f | 9 | |
8d9be5c6 | 10 | struct icc_path; |
3b415c8f BA |
11 | struct rproc; |
12 | struct qcom_smem_state; | |
ed5da808 | 13 | struct qcom_sysmon; |
3b415c8f BA |
14 | |
15 | struct qcom_q6v5 { | |
16 | struct device *dev; | |
17 | struct rproc *rproc; | |
18 | ||
19 | struct qcom_smem_state *state; | |
c1fe10d2 SS |
20 | struct qmp *qmp; |
21 | ||
8d9be5c6 BA |
22 | struct icc_path *path; |
23 | ||
3b415c8f BA |
24 | unsigned stop_bit; |
25 | ||
26 | int wdog_irq; | |
27 | int fatal_irq; | |
28 | int ready_irq; | |
29 | int handover_irq; | |
30 | int stop_irq; | |
31 | ||
32 | bool handover_issued; | |
33 | ||
34 | struct completion start_done; | |
35 | struct completion stop_done; | |
36 | ||
37 | int crash_reason; | |
38 | ||
39 | bool running; | |
40 | ||
c1fe10d2 | 41 | const char *load_state; |
3b415c8f BA |
42 | void (*handover)(struct qcom_q6v5 *q6v5); |
43 | }; | |
44 | ||
45 | int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, | |
c1fe10d2 | 46 | struct rproc *rproc, int crash_reason, const char *load_state, |
3b415c8f | 47 | void (*handover)(struct qcom_q6v5 *q6v5)); |
c1fe10d2 | 48 | void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5); |
3b415c8f BA |
49 | |
50 | int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5); | |
51 | int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5); | |
ed5da808 | 52 | int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon); |
3b415c8f | 53 | int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout); |
e9142f5c | 54 | unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5); |
3b415c8f BA |
55 | |
56 | #endif |