Re: [PATCH v4 03/15] firmware: qcom_scm: Migrate to generic PAS service

Sumit Garg
2026-05-04T11:23:48Z

On Fri, May 01, 2026 at 07:11:19PM +0530, Sumit Garg wrote:
> On Wed, Apr 29, 2026 at 04:18:41PM +0530, Mukesh Ojha wrote:
> > On Mon, Apr 27, 2026 at 03:25:51PM +0530, Sumit Garg wrote:
> > > From: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > >
> > > With the availability of generic PAS service, let's add SCM calls as
> > > a backend to keep supporting legacy QTEE interfaces. The exported
> > > qcom_scm* wrappers will get dropped once all the client drivers get
> > > migrated as part of future patches.
> > >
> > > Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > > ---
> > > drivers/firmware/qcom/Kconfig | 1 +
> > > drivers/firmware/qcom/qcom_scm.c | 335 ++++++++++++++-----------------
> > > 2 files changed, 155 insertions(+), 181 deletions(-)
> > >
> > > diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> > > index 9b06a69d3a6d..d87a962e93da 100644
> > > --- a/drivers/firmware/qcom/qcom_scm.c
> > > +++ b/drivers/firmware/qcom/qcom_scm.c
> > >
> > > -/**
> > > - * qcom_scm_pas_shutdown() - Shut down the remote processor
> > > - * @pas_id: peripheral authentication service id
> > > - *
> > > - * Returns 0 on success.
> > > - */
> > > -int qcom_scm_pas_shutdown(u32 pas_id)
> > > +static int __qcom_scm_pas_set_remote_state(struct device *dev, u32 state,
> > > + u32 pas_id)
> > > +{
> > > + struct qcom_scm_desc desc = {
> > > + .svc = QCOM_SCM_SVC_BOOT,
> > > + .cmd = QCOM_SCM_BOOT_SET_REMOTE_STATE,
> > > + .arginfo = QCOM_SCM_ARGS(2),
> > > + .args[0] = state,
> > > + .args[1] = pas_id,
> > > + .owner = ARM_SMCCC_OWNER_SIP,
> > > + };
> > > + struct qcom_scm_res res;
> > > + int ret;
> > > +
> > > + ret = qcom_scm_call(dev, &desc, &res);
> > > +
> > > + return ret ? : res.result[0];
> > > +}
> > > +
> > > +int qcom_scm_set_remote_state(u32 state, u32 id)
> >
> > s/id/pas_id
>
> Ack.
>

Coming back to this comment again, since this is a temporary wrapper
which is going to be dropped as part of 2nd last patch, I don't think
there is value to fix them as they maintain existing APIs interface.

-Sumit