blob: 832e20271664e020e99182ca0247298999b4620e [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __RPROC_QCOM_COMMON_H__
3#define __RPROC_QCOM_COMMON_H__
4
5#include <linux/remoteproc.h>
6#include "remoteproc_internal.h"
7
8struct qcom_rproc_glink {
9 struct rproc_subdev subdev;
10
11 struct device *dev;
12 struct device_node *node;
13 struct qcom_glink *edge;
14};
15
16struct qcom_rproc_subdev {
17 struct rproc_subdev subdev;
18
19 struct device *dev;
20 struct device_node *node;
21 struct qcom_smd_edge *edge;
22};
23
24struct qcom_rproc_ssr {
25 struct rproc_subdev subdev;
26
27 const char *name;
28};
29
30struct resource_table *qcom_mdt_find_rsc_table(struct rproc *rproc,
31 const struct firmware *fw,
32 int *tablesz);
33
34void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
35void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
36
37void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
38void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
39
40void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
41 const char *ssr_name);
42void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
43
44#endif