qcom_q6v5.h (1239B)
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> 8#include <linux/soc/qcom/qcom_aoss.h> 9 10struct icc_path; 11struct rproc; 12struct qcom_smem_state; 13struct qcom_sysmon; 14 15struct qcom_q6v5 { 16 struct device *dev; 17 struct rproc *rproc; 18 19 struct qcom_smem_state *state; 20 struct qmp *qmp; 21 22 struct icc_path *path; 23 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 41 const char *load_state; 42 void (*handover)(struct qcom_q6v5 *q6v5); 43}; 44 45int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, 46 struct rproc *rproc, int crash_reason, const char *load_state, 47 void (*handover)(struct qcom_q6v5 *q6v5)); 48void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5); 49 50int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5); 51int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5); 52int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon); 53int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout); 54unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5); 55 56#endif