]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/remoteproc/qcom_common.h
remoteproc: coredump: Add minidump functionality
[mirror_ubuntu-jammy-kernel.git] / drivers / remoteproc / qcom_common.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
bde440ee
BA
2#ifndef __RPROC_QCOM_COMMON_H__
3#define __RPROC_QCOM_COMMON_H__
4
b90fcfcb
BA
5#include <linux/remoteproc.h>
6#include "remoteproc_internal.h"
1fb82ee8
BA
7#include <linux/soc/qcom/qmi.h>
8
9struct qcom_sysmon;
b90fcfcb 10
eea07023
BA
11struct qcom_rproc_glink {
12 struct rproc_subdev subdev;
13
cd9fc8f1
BA
14 const char *ssr_name;
15
eea07023
BA
16 struct device *dev;
17 struct device_node *node;
18 struct qcom_glink *edge;
19};
20
b90fcfcb
BA
21struct qcom_rproc_subdev {
22 struct rproc_subdev subdev;
23
24 struct device *dev;
25 struct device_node *node;
26 struct qcom_smd_edge *edge;
27};
bde440ee 28
5abfe5cf
RB
29struct qcom_ssr_subsystem;
30
1e140df0
BA
31struct qcom_rproc_ssr {
32 struct rproc_subdev subdev;
5abfe5cf 33 struct qcom_ssr_subsystem *info;
1e140df0
BA
34};
35
cd9fc8f1
BA
36void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink,
37 const char *ssr_name);
eea07023
BA
38void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
39
dcb57ed4
SJ
40int qcom_register_dump_segments(struct rproc *rproc, const struct firmware *fw);
41
b90fcfcb
BA
42void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
43void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
44
1e140df0
BA
45void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
46 const char *ssr_name);
47void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
48
1fb82ee8
BA
49#if IS_ENABLED(CONFIG_QCOM_SYSMON)
50struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
51 const char *name,
52 int ssctl_instance);
53void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon);
5c212aaf 54bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon);
1fb82ee8
BA
55#else
56static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
57 const char *name,
58 int ssctl_instance)
59{
60 return NULL;
61}
62
63static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon)
64{
65}
5c212aaf
BA
66
67static inline bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon)
68{
69 return false;
70}
1fb82ee8
BA
71#endif
72
bde440ee 73#endif