firmware: qcom: scm: Add support for MC boot address API
authorStephan Gerhold <stephan@gerhold.net>
Wed, 1 Dec 2021 13:05:05 +0000 (14:05 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 4 Feb 2022 03:54:48 +0000 (21:54 -0600)
commitf60a317bcbea5c5b8923d6de6c7288850fdd83fb
tree2746988a861750cdc64f4cb7e526eb4b4316a44c
parent52beb1fc237d67cdc64277dc90047767a6fc52d7
firmware: qcom: scm: Add support for MC boot address API

It looks like the old QCOM_SCM_BOOT_SET_ADDR API is broken on some
MSM8916 firmware versions that implement the newer SMC32 calling
convention. It just returns -EINVAL no matter which arguments are
being passed.

This does not cause any problems downstream because it first tries
to use the new multi-cluster API replacement which is working fine.

Implement support for the multi-cluster variant of the SCM call
by attempting it first but still fallback to the old call in case
of an error. Also, to be absolutely sure only use the multi-cluster
variant with the SMC calling convention since older platforms should
not need this.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211201130505.257379-5-stephan@gerhold.net
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h