public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Melody Olvera <quic_molvera@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Andy Gross <agross@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Robert Marko <robimarko@gmail.com>,
	Guru Das Srinagesh <quic_gurus@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-remoteproc@vger.kernel.org>
Subject: Re: [PATCH v2 5/7] remoteproc: qcom: q6v5: Add support for q6 rmb registers
Date: Mon, 20 Mar 2023 16:30:29 -0700	[thread overview]
Message-ID: <394ed3a3-678e-d2bb-a032-aee135acaee2@quicinc.com> (raw)
In-Reply-To: <20230316021736.d53quam5eew5fr6m@ripper>



On 3/15/2023 7:17 PM, Bjorn Andersson wrote:
> On Mon, Mar 06, 2023 at 03:12:00PM -0800, Melody Olvera wrote:
>> When attaching a running Q6, the remoteproc driver needs a way
>> to communicate with the Q6 using rmb registers, so allow the
>> rmb register to be gotten from the device tree if present.
>>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---
>>  drivers/remoteproc/qcom_q6v5.c | 9 +++++++++
>>  drivers/remoteproc/qcom_q6v5.h | 8 ++++++++
>>  2 files changed, 17 insertions(+)
>>
>> diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
>> index 192c7aa0e39e..e8c6be70ebfd 100644
>> --- a/drivers/remoteproc/qcom_q6v5.c
>> +++ b/drivers/remoteproc/qcom_q6v5.c
>> @@ -254,6 +254,7 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
>>  		   void (*handover)(struct qcom_q6v5 *q6v5))
>>  {
>>  	int ret;
>> +	struct resource *res;
>>  
>>  	q6v5->rproc = rproc;
>>  	q6v5->dev = &pdev->dev;
>> @@ -263,6 +264,14 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
>>  	init_completion(&q6v5->start_done);
>>  	init_completion(&q6v5->stop_done);
>>  
>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> In addition to the PAS driver, __func__ is being invoked by the non-PAS
> ADSP and MPSS drivers as well, which both uses reg[1] for other
> purposes. So this won't work.
>
> Perhaps I'm missing some possibility of reuse, but it seems reasonable
> for this to move to the pas-driver.

Yeah that's fairly sensible. I'll move this to the pas driver.

Thanks,
Melody
>
> Thanks,
> Bjorn
>
>> +	if (res) {
>> +		q6v5->rmb_base = devm_ioremap_resource(&pdev->dev, res);
>> +		if (IS_ERR(q6v5->rmb_base))
>> +			q6v5->rmb_base = NULL;
>> +	} else
>> +		q6v5->rmb_base = NULL;
>> +
>>  	q6v5->wdog_irq = platform_get_irq_byname(pdev, "wdog");
>>  	if (q6v5->wdog_irq < 0)
>>  		return q6v5->wdog_irq;
>> diff --git a/drivers/remoteproc/qcom_q6v5.h b/drivers/remoteproc/qcom_q6v5.h
>> index 5a859c41896e..95824d5b64ce 100644
>> --- a/drivers/remoteproc/qcom_q6v5.h
>> +++ b/drivers/remoteproc/qcom_q6v5.h
>> @@ -7,6 +7,12 @@
>>  #include <linux/completion.h>
>>  #include <linux/soc/qcom/qcom_aoss.h>
>>  
>> +#define RMB_BOOT_WAIT_REG 0x8
>> +#define RMB_BOOT_CONT_REG 0xC
>> +#define RMB_Q6_BOOT_STATUS_REG 0x10
>> +
>> +#define RMB_POLL_MAX_TIMES 250
>> +
>>  struct icc_path;
>>  struct rproc;
>>  struct qcom_smem_state;
>> @@ -16,6 +22,8 @@ struct qcom_q6v5 {
>>  	struct device *dev;
>>  	struct rproc *rproc;
>>  
>> +	void __iomem *rmb_base;
>> +
>>  	struct qcom_smem_state *state;
>>  	struct qmp *qmp;
>>  
>> -- 
>> 2.25.1
>>


  reply	other threads:[~2023-03-20 23:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 23:11 [PATCH v2 0/7] remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Melody Olvera
2023-03-06 23:11 ` [PATCH v2 1/7] dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible Melody Olvera
2023-03-06 23:11 ` [PATCH v2 2/7] dt-bindings: soc: qcom: aoss: Document " Melody Olvera
2023-03-09  8:12   ` Krzysztof Kozlowski
2023-03-06 23:11 ` [PATCH v2 3/7] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Melody Olvera
2023-03-09  8:33   ` Krzysztof Kozlowski
2023-03-09  8:34     ` Krzysztof Kozlowski
2023-03-13 21:11     ` Melody Olvera
2023-03-06 23:11 ` [PATCH v2 4/7] soc: qcom: mdt_loader: Enhance split binary detection Melody Olvera
2023-03-08  4:45   ` kernel test robot
2023-03-16  2:12   ` Bjorn Andersson
2023-03-21 17:42     ` Gokul Krishna Krishnakumar
2023-03-06 23:12 ` [PATCH v2 5/7] remoteproc: qcom: q6v5: Add support for q6 rmb registers Melody Olvera
2023-03-16  2:17   ` Bjorn Andersson
2023-03-20 23:30     ` Melody Olvera [this message]
2023-03-06 23:12 ` [PATCH v2 6/7] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Melody Olvera
2023-03-16  2:27   ` Bjorn Andersson
2023-03-20 23:46     ` Melody Olvera
2023-03-06 23:12 ` [PATCH v2 7/7] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible & data Melody Olvera
2023-03-16  3:21 ` (subset) [PATCH v2 0/7] remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=394ed3a3-678e-d2bb-a032-aee135acaee2@quicinc.com \
    --to=quic_molvera@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=quic_gurus@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=robimarko@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox