mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
5b9f51b200
Request in-kernel protection domain mapper to be started before starting Qualcomm DSP and release it once DSP is stopped. Once all DSPs are stopped, the PD mapper will be stopped too. Reviewed-by: Chris Lew <quic_clew@quicinc.com> Tested-by: Steev Klimaszewski <steev@kali.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-5-a84ee3591c8e@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
90 lines
2.3 KiB
C
90 lines
2.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __RPROC_QCOM_COMMON_H__
|
|
#define __RPROC_QCOM_COMMON_H__
|
|
|
|
#include <linux/remoteproc.h>
|
|
#include "remoteproc_internal.h"
|
|
#include <linux/soc/qcom/qmi.h>
|
|
|
|
struct qcom_glink_smem;
|
|
struct qcom_sysmon;
|
|
|
|
struct qcom_rproc_glink {
|
|
struct rproc_subdev subdev;
|
|
|
|
const char *ssr_name;
|
|
|
|
struct device *dev;
|
|
struct device_node *node;
|
|
struct qcom_glink_smem *edge;
|
|
};
|
|
|
|
struct qcom_rproc_subdev {
|
|
struct rproc_subdev subdev;
|
|
|
|
struct device *dev;
|
|
struct device_node *node;
|
|
struct qcom_smd_edge *edge;
|
|
};
|
|
|
|
struct qcom_ssr_subsystem;
|
|
|
|
struct qcom_rproc_ssr {
|
|
struct rproc_subdev subdev;
|
|
struct qcom_ssr_subsystem *info;
|
|
};
|
|
|
|
struct qcom_rproc_pdm {
|
|
struct rproc_subdev subdev;
|
|
struct device *dev;
|
|
int index;
|
|
struct auxiliary_device *adev;
|
|
};
|
|
|
|
void qcom_minidump(struct rproc *rproc, unsigned int minidump_id,
|
|
void (*rproc_dumpfn_t)(struct rproc *rproc,
|
|
struct rproc_dump_segment *segment, void *dest, size_t offset,
|
|
size_t size));
|
|
|
|
void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink,
|
|
const char *ssr_name);
|
|
void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
|
|
|
|
int qcom_register_dump_segments(struct rproc *rproc, const struct firmware *fw);
|
|
|
|
void qcom_add_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
|
|
void qcom_remove_smd_subdev(struct rproc *rproc, struct qcom_rproc_subdev *smd);
|
|
|
|
void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
|
|
const char *ssr_name);
|
|
void qcom_remove_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr);
|
|
|
|
void qcom_add_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
|
|
void qcom_remove_pdm_subdev(struct rproc *rproc, struct qcom_rproc_pdm *pdm);
|
|
|
|
#if IS_ENABLED(CONFIG_QCOM_SYSMON)
|
|
struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
|
|
const char *name,
|
|
int ssctl_instance);
|
|
void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon);
|
|
bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon);
|
|
#else
|
|
static inline struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc,
|
|
const char *name,
|
|
int ssctl_instance)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline void qcom_remove_sysmon_subdev(struct qcom_sysmon *sysmon)
|
|
{
|
|
}
|
|
|
|
static inline bool qcom_sysmon_shutdown_acked(struct qcom_sysmon *sysmon)
|
|
{
|
|
return false;
|
|
}
|
|
#endif
|
|
|
|
#endif
|