On 12/24/2025 4:15 AM, Dmitry Baryshkov wrote:
> On Tue, Dec 23, 2025 at 01:13:50AM -0800, Jingyi Wang wrote:
>> From: Gokul krishna Krishnakumar <[email protected]>
>
> So, two names start from the capital letters and one from a downcase
> one?
>
will fix
>>
>> Subsystems can be brought out of reset by entities such as bootloaders.
>> As the irq enablement could be later than subsystem bring up, the state
>> of subsystem should be checked by reading SMP2P bits and performing ping
>> test.
>>
>> A new qcom_pas_attach() function is introduced. if a crash state is
>> detected for the subsystem, rproc_report_crash() is called. If the
>> subsystem is ready either at the first check or within a 5-second timeout
>> and the ping is successful, it will be marked as "attached". The ready
>> state could be set by either ready interrupt or handover interrupt.
>>
>> If "early_boot" is set by kernel but "subsys_booted" is not completed
>> within the timeout, It could be the early boot feature is not supported
>> by other entities. In this case, the state will be marked as RPROC_OFFLINE
>> so that the PAS driver can load the firmware and start the remoteproc. As
>> the running state is set once attach function is called, the watchdog or
>> fatal interrupt received can be handled correctly.
>>
>> Signed-off-by: Gokul krishna Krishnakumar
>> <[email protected]>
>> Co-developed-by: Jingyi Wang <[email protected]>
>> Signed-off-by: Jingyi Wang <[email protected]>
>> ---
>> drivers/remoteproc/qcom_q6v5.c | 87 ++++++++++++++++++++++++++++++++-
>> drivers/remoteproc/qcom_q6v5.h | 11 ++++-
>> drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
>> drivers/remoteproc/qcom_q6v5_mss.c | 2 +-
>> drivers/remoteproc/qcom_q6v5_pas.c | 97
>> ++++++++++++++++++++++++++++++++++++-
>> drivers/remoteproc/qcom_q6v5_wcss.c | 2 +-
>> 6 files changed, 195 insertions(+), 6 deletions(-)
>
>> @@ -247,7 +328,7 @@ EXPORT_SYMBOL_GPL(qcom_q6v5_panic);
>> */
>> int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
>> struct rproc *rproc, int crash_reason, const char
>> *load_state,
>> - void (*handover)(struct qcom_q6v5 *q6v5))
>> + bool early_boot, void (*handover)(struct qcom_q6v5 *q6v5))
>
> Separate lines
>
will fix
>> {
>> int ret;
>>
>> @@ -326,6 +329,7 @@ static int qcom_pas_start(struct rproc *rproc)
>> }
>>
>> ret = qcom_q6v5_wait_for_start(&pas->q6v5, msecs_to_jiffies(5000));
>> +
>
> Nope, unnecessary empty line.
>
will fix
>> if (ret == -ETIMEDOUT) {
>> dev_err(pas->dev, "start timed out\n");
>> qcom_scm_pas_shutdown(pas->pas_id);
>
Thanks,
Jingyi