1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __RPROC_QCOM_COMMON_H__
3 #define __RPROC_QCOM_COMMON_H__
5 #include <linux/remoteproc.h>
6 #include "remoteproc_internal.h"
7 #include <linux/soc/qcom/qmi.h>
11 struct qcom_rproc_glink {
12 struct rproc_subdev subdev;
17 struct device_node *node;
18 struct qcom_glink *edge;
21 struct qcom_rproc_subdev {
22 struct rproc_subdev subdev;
25 struct device_node *node;
26 struct qcom_smd_edge *edge;
29 struct qcom_ssr_subsystem;
31 struct qcom_rproc_ssr {
32 struct rproc_subdev subdev;
33 struct qcom_ssr_subsystem *info;
36 void qcom_minidump(struct rproc *rproc, unsigned int minidump_id);
38 void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink,
39 const char *ssr_name);
40 void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
42 int qcom_register_dump_segments(struct rproc *rproc, const struct firmware *fw);
44 void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
45 void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
47 void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
48 const char *ssr_name);
49 void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
51 #if IS_ENABLED(CONFIG_QCOM_SYSMON)
52 struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
55 void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon);
56 bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon);
58 static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
65 static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon)
69 static inline bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon)