Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / remoteproc / qcom_common.h
blobb07fbaa091a064c344cc63ea7ce496529e03c0a0
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>
9 struct qcom_glink_smem;
10 struct qcom_sysmon;
12 struct qcom_rproc_glink {
13 struct rproc_subdev subdev;
15 const char *ssr_name;
17 struct device *dev;
18 struct device_node *node;
19 struct qcom_glink_smem *edge;
22 struct qcom_rproc_subdev {
23 struct rproc_subdev subdev;
25 struct device *dev;
26 struct device_node *node;
27 struct qcom_smd_edge *edge;
30 struct qcom_ssr_subsystem;
32 struct qcom_rproc_ssr {
33 struct rproc_subdev subdev;
34 struct qcom_ssr_subsystem *info;
37 struct qcom_rproc_pdm {
38 struct rproc_subdev subdev;
39 struct device *dev;
40 int index;
41 struct auxiliary_device *adev;
44 void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
45 void (*rproc_dumpfn_t)(struct rproc *rproc,
46 struct rproc_dump_segment *segment, void *dest, size_t offset,
47 size_t size));
49 void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink,
50 const char *ssr_name);
51 void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
53 int qcom_register_dump_segments(struct rproc *rproc, const struct firmware *fw);
55 void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
56 void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
58 void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
59 const char *ssr_name);
60 void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
62 void qcom_add_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
63 void qcom_remove_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
65 #if IS_ENABLED(CONFIG_QCOM_SYSMON)
66 struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
67 const char *name,
68 int ssctl_instance);
69 void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon);
70 bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon);
71 #else
72 static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
73 const char *name,
74 int ssctl_instance)
76 return NULL;
79 static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon)
83 static inline bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon)
85 return false;
87 #endif
89 #endif