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
;
15 struct device_node
*node
;
16 struct qcom_glink
*edge
;
19 struct qcom_rproc_subdev
{
20 struct rproc_subdev subdev
;
23 struct device_node
*node
;
24 struct qcom_smd_edge
*edge
;
27 struct qcom_rproc_ssr
{
28 struct rproc_subdev subdev
;
33 void qcom_add_glink_subdev(struct rproc
*rproc
, struct qcom_rproc_glink
*glink
);
34 void qcom_remove_glink_subdev(struct rproc
*rproc
, struct qcom_rproc_glink
*glink
);
36 int qcom_register_dump_segments(struct rproc
*rproc
, const struct firmware
*fw
);
38 void qcom_add_smd_subdev(struct rproc
*rproc
, struct qcom_rproc_subdev
*smd
);
39 void qcom_remove_smd_subdev(struct rproc
*rproc
, struct qcom_rproc_subdev
*smd
);
41 void qcom_add_ssr_subdev(struct rproc
*rproc
, struct qcom_rproc_ssr
*ssr
,
42 const char *ssr_name
);
43 void qcom_remove_ssr_subdev(struct rproc
*rproc
, struct qcom_rproc_ssr
*ssr
);
45 #if IS_ENABLED(CONFIG_QCOM_SYSMON)
46 struct qcom_sysmon
*qcom_add_sysmon_subdev(struct rproc
*rproc
,
49 void qcom_remove_sysmon_subdev(struct qcom_sysmon
*sysmon
);
51 static inline struct qcom_sysmon
*qcom_add_sysmon_subdev(struct rproc
*rproc
,
58 static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon
*sysmon
)