* [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency
@ 2018-10-09 2:08 Brian Norris
2018-10-09 6:21 ` Bjorn Andersson
0 siblings, 1 reply; 4+ messages in thread
From: Brian Norris @ 2018-10-09 2:08 UTC (permalink / raw)
To: Ohad Ben-Cohen, Bjorn Andersson
Cc: linux-remoteproc, linux-kernel, linux-arm-msm, linux-soc, Brian Norris
Similar to qcom_q6v5_pas and qcom_wcnss drivers, probe will fail if SCM
is not up.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/remoteproc/qcom_q6v5_mss.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index a839b07a58b1..8836ca1bc0c1 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1151,6 +1151,9 @@ static int q6v5_probe(struct platform_device *pdev)
if (!desc)
return -EINVAL;
+ if (!qcom_scm_is_available())
+ return -EPROBE_DEFER;
+
rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops,
desc->hexagon_mba_image, sizeof(*qproc));
if (!rproc) {
--
2.19.0.605.g01d371f741-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency
2018-10-09 2:08 [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency Brian Norris
@ 2018-10-09 6:21 ` Bjorn Andersson
2018-10-09 17:02 ` Brian Norris
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Andersson @ 2018-10-09 6:21 UTC (permalink / raw)
To: Sibi Sankar, Brian Norris
Cc: Ohad Ben-Cohen, linux-remoteproc, linux-kernel, linux-arm-msm, linux-soc
On Mon 08 Oct 19:08 PDT 2018, Brian Norris wrote:
> Similar to qcom_q6v5_pas and qcom_wcnss drivers, probe will fail if SCM
> is not up.
>
Thanks Brian, this dependency was introduced with the memory ownership
support.
I applied it with an updated conditional to make it explicit that it
related to need_mem_protection, updated the commit message to describe
actual relationship to the memory protection mechanism and added a
Fixes: tag.
Don't we also need to add the ability to disable need_mem_protection
when we're running ATF?
Regards,
Bjorn
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index a839b07a58b1..8836ca1bc0c1 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -1151,6 +1151,9 @@ static int q6v5_probe(struct platform_device *pdev)
> if (!desc)
> return -EINVAL;
>
> + if (!qcom_scm_is_available())
> + return -EPROBE_DEFER;
> +
> rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops,
> desc->hexagon_mba_image, sizeof(*qproc));
> if (!rproc) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency
2018-10-09 6:21 ` Bjorn Andersson
@ 2018-10-09 17:02 ` Brian Norris
2018-10-09 17:21 ` Sibi Sankar
0 siblings, 1 reply; 4+ messages in thread
From: Brian Norris @ 2018-10-09 17:02 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Sibi Sankar, Ohad Ben-Cohen, linux-remoteproc, linux-kernel,
linux-arm-msm, linux-soc
On Mon, Oct 08, 2018 at 11:21:25PM -0700, Bjorn Andersson wrote:
> On Mon 08 Oct 19:08 PDT 2018, Brian Norris wrote:
>
> > Similar to qcom_q6v5_pas and qcom_wcnss drivers, probe will fail if SCM
> > is not up.
> >
>
> Thanks Brian, this dependency was introduced with the memory ownership
> support.
That's a good point. I'm actually not that familiar with this particular
driver--I was just trying to resolve an OOPS I saw while bringing this
driver up--but that does look correct.
> I applied it with an updated conditional to make it explicit that it
> related to need_mem_protection, updated the commit message to describe
> actual relationship to the memory protection mechanism and added a
> Fixes: tag.
Your version looks good, thanks.
> Don't we also need to add the ability to disable need_mem_protection
> when we're running ATF?
I'm not sure exactly, but FWIW I'm running some form of ATF on SDM845
and I'm running with 'needs_memory_protection' (hence, this patch).
Regards,
Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency
2018-10-09 17:02 ` Brian Norris
@ 2018-10-09 17:21 ` Sibi Sankar
0 siblings, 0 replies; 4+ messages in thread
From: Sibi Sankar @ 2018-10-09 17:21 UTC (permalink / raw)
To: Brian Norris
Cc: Bjorn Andersson, Ohad Ben-Cohen, linux-remoteproc, linux-kernel,
linux-arm-msm, linux-soc
On 2018-10-09 22:32, Brian Norris wrote:
> On Mon, Oct 08, 2018 at 11:21:25PM -0700, Bjorn Andersson wrote:
>> On Mon 08 Oct 19:08 PDT 2018, Brian Norris wrote:
>>
>> > Similar to qcom_q6v5_pas and qcom_wcnss drivers, probe will fail if SCM
>> > is not up.
>> >
>>
>> Thanks Brian, this dependency was introduced with the memory ownership
>> support.
>
> That's a good point. I'm actually not that familiar with this
> particular
> driver--I was just trying to resolve an OOPS I saw while bringing this
> driver up--but that does look correct.
>
>> I applied it with an updated conditional to make it explicit that it
>> related to need_mem_protection, updated the commit message to describe
>> actual relationship to the memory protection mechanism and added a
>> Fixes: tag.
>
> Your version looks good, thanks.
>
>> Don't we also need to add the ability to disable need_mem_protection
>> when we're running ATF?
>
> I'm not sure exactly, but FWIW I'm running some form of ATF on SDM845
> and I'm running with 'needs_memory_protection' (hence, this patch).
>
AFAIK ATF will eventually support the hyp assign calls even though they
are just stubs as of now.
> Regards,
> Brian
--
-- Sibi Sankar --
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-09 17:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 2:08 [PATCH] remoteproc: qcom: q6v5-pil: add SCM probe dependency Brian Norris
2018-10-09 6:21 ` Bjorn Andersson
2018-10-09 17:02 ` Brian Norris
2018-10-09 17:21 ` Sibi Sankar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).