Skip to content
Snippets Groups Projects
Commit 257de41c authored by Siddharth Gupta's avatar Siddharth Gupta Committed by Gokul krishna Krishnakumar
Browse files

remoteproc: qcom: Register SSR subdevice with the q6v5 IRQ driver


To allow for early notifications to be sent to the SSR clients the
q6v5 driver needs a way to invoke the SSR subdevice for the
remoteproc. This change adds an API in the q6v5 IRQ layer to
optionally register the SSR subdevice, and registers the SSR
subdevice in the PAS driver.

Change-Id: I450d262575538b6b2c2e038a41fd0cca234bc3b2
Signed-off-by: default avatarSiddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: default avatarGokul krishna Krishnakumar <quic_gokukris@quicinc.com>
parent c476752a
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,12 @@ int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5)
}
EXPORT_SYMBOL_GPL(qcom_q6v5_unprepare);
void qcom_q6v5_register_ssr_subdev(struct qcom_q6v5 *q6v5, struct rproc_subdev *ssr_subdev)
{
q6v5->ssr_subdev = ssr_subdev;
}
EXPORT_SYMBOL(qcom_q6v5_register_ssr_subdev);
static void qcom_q6v5_crash_handler_work(struct work_struct *work)
{
struct qcom_q6v5 *q6v5 = container_of(work, struct qcom_q6v5, crash_handler);
......@@ -242,6 +248,7 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
q6v5->dev = &pdev->dev;
q6v5->crash_reason = crash_reason;
q6v5->handover = handover;
q6v5->ssr_subdev = NULL;
init_completion(&q6v5->start_done);
init_completion(&q6v5->stop_done);
......
......@@ -26,6 +26,8 @@ struct qcom_q6v5 {
int handover_irq;
int stop_irq;
struct rproc_subdev *ssr_subdev;
struct work_struct crash_handler;
bool handover_issued;
......@@ -43,7 +45,7 @@ struct qcom_q6v5 {
int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
struct rproc *rproc, int crash_reason,
void (*handover)(struct qcom_q6v5 *q6v5));
void qcom_q6v5_register_ssr_subdev(struct qcom_q6v5 *q6v5, struct rproc_subdev *ssr_subdev);
int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5);
int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon);
......
......@@ -821,6 +821,8 @@ static int adsp_probe(struct platform_device *pdev)
if (ret)
goto detach_proxy_pds;
qcom_q6v5_register_ssr_subdev(&adsp->q6v5, &adsp->ssr_subdev.subdev);
timeout_disabled = qcom_pil_timeouts_disabled();
qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment