summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_common.c
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2020-04-22 17:37:33 -0700
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-05-07 11:03:55 -0700
commitcd9fc8f1b35bd75e0d33470a01baff2848a9443a (patch)
treee11102b574909c4591bbe42137e160bbce5b8c15 /drivers/remoteproc/qcom_common.c
parent2fb75ceaf71a4a198fc67b984aa95527c993fa1a (diff)
remoteproc: qcom: Pass ssr_name to glink subdevice
Pass ssr_name to glink subdevice in preparation for tying glink_ssr to the glink subdevice, rather than having its own "ssr subdevice". Acked-by: Chris Lew <clew@codeaurora.org> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Link: https://lore.kernel.org/r/20200423003736.2027371-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_common.c')
-rw-r--r--drivers/remoteproc/qcom_common.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 60650bcc8c67..ff26f2b68752 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -46,8 +46,10 @@ static void glink_subdev_stop(struct rproc_subdev *subdev, bool crashed)
* qcom_add_glink_subdev() - try to add a GLINK subdevice to rproc
* @rproc: rproc handle to parent the subdevice
* @glink: reference to a GLINK subdev context
+ * @ssr_name: identifier of the associated remoteproc for ssr notifications
*/
-void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink)
+void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink,
+ const char *ssr_name)
{
struct device *dev = &rproc->dev;
@@ -55,6 +57,10 @@ void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink)
if (!glink->node)
return;
+ glink->ssr_name = kstrdup_const(ssr_name, GFP_KERNEL);
+ if (!glink->ssr_name)
+ return;
+
glink->dev = dev;
glink->subdev.start = glink_subdev_start;
glink->subdev.stop = glink_subdev_stop;
@@ -74,6 +80,7 @@ void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glin
return;
rproc_remove_subdev(rproc, &glink->subdev);
+ kfree_const(glink->ssr_name);
of_node_put(glink->node);
}
EXPORT_SYMBOL_GPL(qcom_remove_glink_subdev);