2018-06-05 04:30:36 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#ifndef __QCOM_Q6V5_H__
|
|
|
|
#define __QCOM_Q6V5_H__
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/completion.h>
|
2021-09-16 21:59:21 +08:00
|
|
|
#include <linux/soc/qcom/qcom_aoss.h>
|
2018-06-05 04:30:36 +08:00
|
|
|
|
2022-02-25 11:32:24 +08:00
|
|
|
struct icc_path;
|
2018-06-05 04:30:36 +08:00
|
|
|
struct rproc;
|
|
|
|
struct qcom_smem_state;
|
2020-11-22 13:41:34 +08:00
|
|
|
struct qcom_sysmon;
|
2018-06-05 04:30:36 +08:00
|
|
|
|
|
|
|
struct qcom_q6v5 {
|
|
|
|
struct device *dev;
|
|
|
|
struct rproc *rproc;
|
|
|
|
|
|
|
|
struct qcom_smem_state *state;
|
2021-09-16 21:59:21 +08:00
|
|
|
struct qmp *qmp;
|
|
|
|
|
2022-02-25 11:32:24 +08:00
|
|
|
struct icc_path *path;
|
|
|
|
|
2018-06-05 04:30:36 +08:00
|
|
|
unsigned stop_bit;
|
|
|
|
|
|
|
|
int wdog_irq;
|
|
|
|
int fatal_irq;
|
|
|
|
int ready_irq;
|
|
|
|
int handover_irq;
|
|
|
|
int stop_irq;
|
|
|
|
|
|
|
|
bool handover_issued;
|
|
|
|
|
|
|
|
struct completion start_done;
|
|
|
|
struct completion stop_done;
|
|
|
|
|
|
|
|
int crash_reason;
|
|
|
|
|
|
|
|
bool running;
|
|
|
|
|
2021-09-16 21:59:21 +08:00
|
|
|
const char *load_state;
|
2018-06-05 04:30:36 +08:00
|
|
|
void (*handover)(struct qcom_q6v5 *q6v5);
|
|
|
|
};
|
|
|
|
|
|
|
|
int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
|
2021-09-16 21:59:21 +08:00
|
|
|
struct rproc *rproc, int crash_reason, const char *load_state,
|
2018-06-05 04:30:36 +08:00
|
|
|
void (*handover)(struct qcom_q6v5 *q6v5));
|
2021-09-16 21:59:21 +08:00
|
|
|
void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5);
|
2018-06-05 04:30:36 +08:00
|
|
|
|
|
|
|
int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5);
|
|
|
|
int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
|
2020-11-22 13:41:34 +08:00
|
|
|
int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon);
|
2018-06-05 04:30:36 +08:00
|
|
|
int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout);
|
2020-03-24 13:29:03 +08:00
|
|
|
unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5);
|
2018-06-05 04:30:36 +08:00
|
|
|
|
|
|
|
#endif
|