Re: [PATCH 3/6] firmware: qcom_scm: Workaround lack of "is available" call on SC7180

From: Stephen Boyd
Date: Tue Feb 23 2021 - 19:33:23 EST


Quoting Jeffrey Hugo (2021-02-23 15:38:38)
> On 2/23/2021 2:45 PM, Stephen Boyd wrote:
> > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> > index 21e07a464bd9..9ac84b5d6ce0 100644
> > --- a/drivers/firmware/qcom_scm.c
> > +++ b/drivers/firmware/qcom_scm.c
> > @@ -144,6 +145,18 @@ static enum qcom_scm_convention __get_convention(void)
> > if (!ret && res.result[0] == 1)
> > goto found;
> >
> > + /*
> > + * Some SC7180 firmwares didn't implement the
> > + * QCOM_SCM_INFO_IS_CALL_AVAIL call, so we fallback to forcing ARM_64
> > + * calling conventions on these firmwares. Luckily we don't make any
> > + * early calls into the firmware on these SoCs so the device pointer
> > + * will be valid here to check if the compatible matches.
> > + */
> > + if (of_device_is_compatible(__scm ? __scm->dev->of_node : NULL, "qcom,scm-sc7180")) {
> > + forced = true;
> > + goto found;
> > + }
>
> All SC7180 targets run DT? None have ACPI?
>

Yes, as far as I know all sc7180 boards are using DT. If they aren't,
then presumably they implemented this QCOM_SCM_INFO_IS_CALL_AVAIL call
so this check is still fine.