0001
0002
0003 #ifndef __QCOM_Q6V5_H__
0004 #define __QCOM_Q6V5_H__
0005
0006 #include <linux/kernel.h>
0007 #include <linux/completion.h>
0008 #include <linux/soc/qcom/qcom_aoss.h>
0009
0010 struct icc_path;
0011 struct rproc;
0012 struct qcom_smem_state;
0013 struct qcom_sysmon;
0014
0015 struct qcom_q6v5 {
0016 struct device *dev;
0017 struct rproc *rproc;
0018
0019 struct qcom_smem_state *state;
0020 struct qmp *qmp;
0021
0022 struct icc_path *path;
0023
0024 unsigned stop_bit;
0025
0026 int wdog_irq;
0027 int fatal_irq;
0028 int ready_irq;
0029 int handover_irq;
0030 int stop_irq;
0031
0032 bool handover_issued;
0033
0034 struct completion start_done;
0035 struct completion stop_done;
0036
0037 int crash_reason;
0038
0039 bool running;
0040
0041 const char *load_state;
0042 void (*handover)(struct qcom_q6v5 *q6v5);
0043 };
0044
0045 int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
0046 struct rproc *rproc, int crash_reason, const char *load_state,
0047 void (*handover)(struct qcom_q6v5 *q6v5));
0048 void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5);
0049
0050 int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5);
0051 int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
0052 int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon);
0053 int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout);
0054 unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5);
0055
0056 #endif