firmware: qcom: scm: Add support for MC boot address API
authorStephan Gerhold <stephan@gerhold.net>
Mon, 4 Oct 2021 20:49:52 +0000 (22:49 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 24 Oct 2021 03:15:47 +0000 (22:15 -0500)
commit55845f46df0317fc7b06617ad21ebca08d72b668
tree325f35ed50589d1911487c486e60fc03fffdd747
parent7f8adb19e97339d0b36ea98e61d8c455efd86874
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/20211004204955.21077-12-stephan@gerhold.net
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h