firmware: qcom: scm: Simplify set_cold/warm_boot_addr()
authorStephan Gerhold <stephan@gerhold.net>
Wed, 1 Dec 2021 13:05:03 +0000 (14:05 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 4 Feb 2022 03:54:48 +0000 (21:54 -0600)
commit7734c4b507cefbcf2f7a2a806e79c43e52528c5f
tree5e8fb258d2b58b36bedee8e599a31984cc049de8
parent0ee30ace67e425ab83a1673bf51f50b577328cf9
firmware: qcom: scm: Simplify set_cold/warm_boot_addr()

The qcom_scm_set_cold/warm_boot_addr() implementations have a lot of
functionality that is actually not used.

For example, set_warm_boot_addr() caches the last used entry address
and skips making the SCM call when the entry address is unchanged.
But there is actually just a single call of qcom_scm_set_warm_boot_addr()
in the whole kernel tree, which always configures the entry address
to cpu_resume_arm().

Simplify this by having a single qcom_scm_set_boot_addr() function
for both cold and warm boot address. This is totally sufficient for
the functionality supported in the mainline tree.

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-3-stephan@gerhold.net
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h